[Script Question] .xml or .pck?
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 269
- Joined: Sat, 20. May 06, 14:55
[Script Question] .xml or .pck?
Well I've written a script, a few edits of standard scripts. Now they are normally .pck files in the scripts folder, so I unpacked them to .xml
My question is if someone would install the .xml files would X3 use them or the old .pck files? Or do I have to pack my script files and overwrite the old files?
My question is if someone would install the .xml files would X3 use them or the old .pck files? Or do I have to pack my script files and overwrite the old files?
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
pcks have a higher priority than xmls so you have to pack them to the pck-format or as alternative you can 'replace' them with another method
(for example changing the default behavior of the AI-Ships to your new Scripts, which have another name than the EGO-Scripts and/or change the Script assigned to the Command Slots)
(for example changing the default behavior of the AI-Ships to your new Scripts, which have another name than the EGO-Scripts and/or change the Script assigned to the Command Slots)
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help

-
- Posts: 269
- Joined: Sat, 20. May 06, 14:55
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
You can change the allocation of a command slot - even on the fly in game.
Apparently you can not remove/overwrite an allocated command button checkscript but few use these. (or know what that is =)
Your "regular" setup runs after the ES scripts so if you reallocate the command slot to your script, you effectively replace the ES command without overwriting the files.
Flat out overwriting ES scripts is usually a bad idea because many other scripts call these and wouldn't know what to do with your changed version.
Apparently you can not remove/overwrite an allocated command button checkscript but few use these. (or know what that is =)
Your "regular" setup runs after the ES scripts so if you reallocate the command slot to your script, you effectively replace the ES command without overwriting the files.
Flat out overwriting ES scripts is usually a bad idea because many other scripts call these and wouldn't know what to do with your changed version.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
addition to Gazz: you have to make sure that the Scripts which are re-assigning the Command slots are executed after the other Setup-Scripts, not before... one idea is to make an al.plugin because this Script type is executed after the normal setups
or you use a normal Setup, start a new Global Script there which contains a wait of eg. 10 seconds and then re-assigns the Command-Slots
(no re-assingnmant of the slots in the setup itself)
or you use a normal Setup, start a new Global Script there which contains a wait of eg. 10 seconds and then re-assigns the Command-Slots

if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help

-
- Posts: 269
- Joined: Sat, 20. May 06, 14:55
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
no, the START of another script is unavoidable because the setup-scripts are executed in serial, so when you have a wait in a setup-script the following setups are executed after this setup is finished.. (thats the reason for not using waits in setups - it is simply a bad idea
and infinite loops even with a wait in a setup are even worse...)
PS the small text has nothing to do with the Topic itself..

PS the small text has nothing to do with the Topic itself..
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help

-
- Posts: 269
- Joined: Sat, 20. May 06, 14:55
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
I have several setup scripts that run about 1-3 sec after all other setups are finished.UniTrader wrote:no, the START of another script is unavoidable because the setup-scripts are executed in serial, so when you have a wait in a setup-script the following setups are executed after this setup is finished.. (thats the reason for not using waits in setups - it is simply a bad idea ;) and infinite loops even with a wait in a setup are even worse...)
Basically the setup script is STARTing itself like a library.
Easy to tell in the script because then it's started with an argument...
It's a bit of a whacky concept but works like a charm.
That way *I* avoid most conflict issues. Dunno about other scripts. =P
That's very useful for starting a new game with mods.
Apparently there are timing issues with referencing mod data before it is "in the game".
If I delay the setup a bit, all the modded objects can "settle" in the game and can be referenced without a problem.
I never found out why... but it works. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.