Not sure if it's just me, but when I use the script function "get gate destination: return sector" from the Universe and Sector commands group, the script will not save from that point on. My usage is
$nextdoor = South Gate get gate destination: return sector= 1
$nextdoor is the return value and is a new variable
South Gate is of type <var/warpgate> and is selected from by choosing Select Warpgate
1 is of type <var/number> and is entered as a number
There are no errors. When I exit the script, it asks me if I want to save it, to which I say yes. I can run the script and everything works as I expect it to. I can go back into the script and make changes and everything appears normal. Everything is fine until I exit the game and go back in (or alt tab out and look at the xml file generated) and any changes made after I have used this function are not there. I can however delete any use of this function from the script, and after I do that, changes will be saved again.
This can be repeated (at least in my game) by doing the following. Using the Boring Boron start
- Make a new script and have it do something like add an advanced sat to the current sector using
$sat= create ship: type= Advanced Satellite owner=Player addto= Kingdoms End x= 0 y= 0 z= 0
- Exit and run the script, confirm that the sat is placed
- Exit the game to the main menu, then start a new game using the same start
- Rerun the script and ensure it still works correctly
- Edit the script and add the following functions
$nextdoor = South Gate get gate destination: return sector= 1
$nextdoor -> set known status to TRUE
- Exit and run the script, confirm that the sector Three Worlds is now visible on the universe map
- Exit the game to the main menu, then start a new game using the same start
- Edit the script
If you have the same as me, you'll find the two additional lines you added are not there, and running the script will not reveal the Three Worlds sector. Additionally, if you add those two lines to the script, save the script and alt tab out, you can see that the changes haven't been saved by opening the script xml file in a text editor. If you then go back into TC and delete only the "get gate ddestination" line, save and alt tab, you will find the script xml file now contains the original add satellite line and the set known line, so the saving has worked once the get gate destination line is removed.
Since I'm running Steam I can't check it this is still present in the V2 patch version. Hopefully this isn't on some list of know bugs, and hopefully I'm not doing something silly causing it not to save??
Any thoughts?
Scripting Bug
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 1471
- Joined: Wed, 3. Aug 05, 08:15
Scripting Bug
Last edited by strude on Mon, 9. Feb 09, 18:05, edited 1 time in total.
Gaming PC: Gigabyte H270M-D3H | i7 7700 | 16Gb DDR4 | Gigabyte GTX1060 6Gb OC | Asus Xonar DGX | Window 10 Home 64bit | Samsung 256Gb SSD
-
- Posts: 7168
- Joined: Sat, 7. Jan 06, 16:01
-
- Posts: 1471
- Joined: Wed, 3. Aug 05, 08:15
-
- Posts: 7168
- Joined: Sat, 7. Jan 06, 16:01
-
- Moderator (Script&Mod)
- Posts: 13489
- Joined: Sun, 15. Feb 04, 20:12
-
- Posts: 1471
- Joined: Wed, 3. Aug 05, 08:15