I've been having some bug reports that reminded me of issues I was seeing *before* I altered some custom versions of core scripts i.e. identical script names, but customised versions that sat in the campaign folder.
I don't see these bugs myself, and cannot replicate them. On a whim I asked a tester to copy them to the override folder, and lo and behold, they don't see the bug anymore
Any ideas whymoving the script from campaign to override will have this effect?
Campaign vs Override script behaviour
Débuté par
WyrinDnjargo
, août 08 2010 07:03
#1
Posté 08 août 2010 - 07:03
#2
Posté 08 août 2010 - 11:47
Did you try removing the module level versions of the script? Is there maybe a version of it in a hak pack?
No real idea (from a scripting POV) why it's location would make a difference between the two folders. Sounds like it is being overridden and placing it in Override folder then makes it override the "bad" script version.
Man that doesn't read well... need more coffee...
No real idea (from a scripting POV) why it's location would make a difference between the two folders. Sounds like it is being overridden and placing it in Override folder then makes it override the "bad" script version.
Man that doesn't read well... need more coffee...
#3
Posté 10 août 2010 - 08:09
OK I've noticed something that may be causing this
When I alter campaign folder evel versions of the scripts
ginc_overland, ginve_overland_constants, and ginc_overland_ai
I get the report that they have compiled and a compiled version saved to the Campaign folder. BUT no .ncs file version is created.
I also found this report on the old forums
But why would a script compile but not create an .ncs version?
When I alter campaign folder evel versions of the scripts
ginc_overland, ginve_overland_constants, and ginc_overland_ai
I get the report that they have compiled and a compiled version saved to the Campaign folder. BUT no .ncs file version is created.
I also found this report on the old forums
But why would a script compile but not create an .ncs version?
#4
Posté 10 août 2010 - 09:27
Wierd.
What I do know is that some things won't work in the campaign folder, only the override one (though I have only seen this happen with baseitems.2da and a couple of item properties 2das). Also, it seems you need the compiled ncs file for the script to work in the override when replacing an existing script (at least I ran into problems without it).
What I do know is that some things won't work in the campaign folder, only the override one (though I have only seen this happen with baseitems.2da and a couple of item properties 2das). Also, it seems you need the compiled ncs file for the script to work in the override when replacing an existing script (at least I ran into problems without it).
#5
Posté 10 août 2010 - 09:35
Your link Gives the answer i was thinking. Are the Scripts ginc_overland, ginve_overland_constants, and ginc_overland_ai main entry scripts ot just includes?
In order for a script to compile it must have a Main
If there is no void main {}; The script will have no compiled code.
The Main is the entry point where the compiled code begins and the compiler only adds stuff the the compiled code as need.
Let me try that again.
If you script a function outside of the Main function. The only time the code for the function will be added to the compiled code is if the Main function makes referance to it. If the main function never calls your Function it will not be added to the compiled code.
I hope that answers the question you are asking.
In order for a script to compile it must have a Main
If there is no void main {}; The script will have no compiled code.
The Main is the entry point where the compiled code begins and the compiler only adds stuff the the compiled code as need.
Let me try that again.
If you script a function outside of the Main function. The only time the code for the function will be added to the compiled code is if the Main function makes referance to it. If the main function never calls your Function it will not be added to the compiled code.
I hope that answers the question you are asking.
#6
Posté 10 août 2010 - 09:49
Yup, those are all #include type files, not "real" scripts. Instead they are a bunch of functions all in one file. They don't have a void main{} which is needed to make the .ncs file. You do need to compile a custom built function though, but unless you have syntax errors it will tell you things are all fine. Its when you go to use it in a calling script, then compile that caller is when you will get all your average error messages (ie. mismatched names, etc.)
I have never had a problem with a script not firing from the campaign folder.
I have never had a problem with a script not firing from the campaign folder.
Modifié par _Knightmare_, 10 août 2010 - 09:50 .
#7
Posté 11 août 2010 - 08:00
thanks guys, yeah they're just includes. hadn't appreciated they'd not compile to an NCS file before.
#8
Posté 11 août 2010 - 11:03
That would explain that.
I have had a problem though with overriding existing scripts from the override folder if the compiled (.ncs) file is not there too.
I have had a problem though with overriding existing scripts from the override folder if the compiled (.ncs) file is not there too.





Retour en haut






