Author Topic: script.cs + packaging for playertype?  (Read 4252 times)


Just keep in mind that if you don't provide a namecheck.txt the add-on will not show up in the add-on menu.

nameCheck.txt does nothing of any use. I'm pretty sure the only reason it exists in the first place is to prevent handicaps from just renaming the folder a crap-on is contained in to circumvent that filter. It's really only one more step to modify the contents of that file inside though, and add-ons execute without it. I consider it a waste of space.


Dunno how you forgeted up your Blockland.

Quote from: http://blockland.us/Change-Log.html
e(); function now works with add-ons directory (short hand partial name matching exec function)

e() is defined in allGameScripts.cs.dso which is executed when you start a server. It won't work before you start a server.
« Last Edit: July 11, 2014, 09:39:05 PM by $trinick »

Dunno how you forgeted up your Blockland.
I figured it out. You have to be hosting a server

I figured it out. You have to be hosting a server

Yup, just figured that out for myself too.

False.
Ah, I see now its description.txt thats mandatory not namecheck.txt , Always mix that up :I

nameCheck.txt does nothing of any use. I'm pretty sure the only reason it exists in the first place is to prevent handicaps from just renaming the folder a crap-on is contained in to circumvent that filter. It's really only one more step to modify the contents of that file inside though, and add-ons execute without it. I consider it a waste of space.

Actually, nameCheck.txt is there so that if you designate any files/folders inside the add-on without using ./ or expandFileName("./ ..."), the add-on wont load at all instead of it loading with errors.

Actually, nameCheck.txt is there so that if you designate any files/folders inside the add-on without using ./ or expandFileName("./ ..."), the add-on wont load at all instead of it loading with errors.
No it isn't, ./ in file names is recognized by the engine when executing the file and makes the file path start in the same folder the script is located.

It has nothing to do with namecheck.txt.

Actually, nameCheck.txt is there so that if you designate any files/folders inside the add-on without using ./ or expandFileName("./ ..."), the add-on wont load at all instead of it loading with errors.
All namecheck does is prevent the add-on from loading if the directory name is different from what the namecheck says

No it isn't, ./ in file names is recognized by the engine when executing the file and makes the file path start in the same folder the script is located.

Yes, but there are some cases where putting ./ on its own doesn't work, for example in AddDamageType when setting a bitmap. You have to define the entire directory (or use expandFileName of course), and if the .zip's name is changed then the add-on will create errors and potentially not work. With a nameCheck.txt, it wouldn't load at all.

From Weapon_gun/server.cs for reference.
Code: [Select]
AddDamageType("Gun",   '<bitmap:add-ons/Weapon_Gun/CI_gun> %1',    '%2 <bitmap:add-ons/Weapon_Gun/CI_gun> %1',0.2,1);

Yes, but there are some cases where putting ./ on its own doesn't work, for example in AddDamageType when setting a bitmap. You have to define the entire directory (or use expandFileName of course), and if the .zip's name is changed then the add-on will create errors and potentially not work. With a nameCheck.txt, it wouldn't load at all.

From Weapon_gun/server.cs for reference.
Code: [Select]
AddDamageType("Gun",   '<bitmap:add-ons/Weapon_Gun/CI_gun> %1',    '%2 <bitmap:add-ons/Weapon_Gun/CI_gun> %1',0.2,1);
That's because you aren't directly setting a file name, but rather embedding one in a string. The engine can't know that there's a file name to be expanded in the middle of the string.

That's why you use "<bitmap:" @ expandFileName("./CI_gun") @ ">", it will tell the engine that you want to expand the relative file name in the middle.

Uh, excuse me, bad news, I can't export the playertype. MS3D crashes when I export it with animations. So yeah.
...anyone have an idea?
Also how does one write a server.cs?

Ya gotta import it into an old blender version then export it I believe. There should be info on that in the General Modification Help board.

Testing the model now. I'm hosting it as we speak. feel free to hop by!
EDIT: Nvm not ready
EDIT:Is ready-er!
EDIT: i'm getting error reports that there's no "Body" node, or no "mount1" or something. wth
« Last Edit: July 12, 2014, 09:59:07 PM by the_stitch »

Your issues are moving more into the spectrum of General Modification Help as they're no longer related to your code. You may be able to get more help there from modelers and stuff, most of us programmers don't know stuff about modelling.

Your issues are moving more into the spectrum of General Modification Help as they're no longer related to your code. You may be able to get more help there from modelers and stuff, most of us programmers don't know stuff about modelling.
Good point. Thanks everyone, you've all really helped me out a lot! Probably never going to see this board again lol cya