Hi, did some working scripts back then in X3, but fail with X4 so far. So I asked chatgpt for help.
I want to create a new "default Behaviour" command. Chatgpt came - after some discussion - up with this structure:
extensions\mod_dir\content.xml
extensions\mod_dir\scripts\doesstuff.lua
extensions\mod_dir\ui\addons\commands.xml
extensions\mod_dir\ui\addons\defaultbehaviours.xml
extensions\mod_dir\ui\addons\orders.xml
The script that actually does things is the .lua file. The others are mostly repetitive for the definition of the command.
The extension now shows up in the settings menu in game, but I do not see any new default command. I also don't see any errors or printouts from the script in the logfiles.
My question is:
Is this structure in principle the correct way to go? Can somebody point me to some forum or tutorials, where I could get more detailed help?
Thanks a lot for any hints!!
Creating a "Default Behavior" script
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Creating a "Default Behavior" script
Recommendation is to not use chatgpt and look in the folders after you extract the files.
-
- Posts: 23
- Joined: Sat, 27. Mar 04, 18:48
Re: Creating a "Default Behavior" script
Hmm, that's a pity. For other language coding chatgpt is quite helpful. So looking through the folders now. Had a look at about 20 xml-files not finding what I'm looking for, so only another 5340 and a couple of lua files to go. scriptproperties.html also does not seem to run in any current browser. But thanks for taking the time to reply.
Does anybody know which files handle global alerts?