[Discussion] Generic X3TC S&M questions III

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
Clanf
Posts: 2
Joined: Thu, 11. Jul 19, 16:04
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by Clanf » Sat, 13. Jul 19, 18:02

question about director\start.xml - when setting relations, what does mutual="1" exactly do? isn't relations are mutual already or is it something different? i just don't get it and it really hunting me

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20602
Joined: Mon, 15. Nov 04, 00:26
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by Cycrow » Sat, 13. Jul 19, 19:33

Every race has a relation with every other race. The player race you see is how the other races see the player. You can also set how you see the other races in the global command console. Mutual will set the relation both ways. So without mutual, you change the argon and boron relations, it'll change how argon see the boron, but not how the boron will see the argon.

Clanf
Posts: 2
Joined: Thu, 11. Jul 19, 16:04
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by Clanf » Sun, 14. Jul 19, 00:03

hm, i think i got it now, its just having separate relations for two races to each other threw me off, you would think "mutual" should be on by default, otherwise there is kinda no point in setting it half way

User avatar
Hairless-Ape
Posts: 98
Joined: Wed, 6. Nov 02, 21:31
xr

Script Reloading

Post by Hairless-Ape » Sat, 10. Aug 19, 03:53

Noob here,


So I modified a script in the /addon/Scripts folder.. new version, and some simple text changes, nothing affecting the logic..
When I load my saved game, and then go into the Script Editor and look at the list of Scripts and their versions, it's showing me the OLD script.
I tried clearing script caches and a few other things, but it seems stuck on V1 of that script no matter how I change it.

How do you force the game to use a new version of a script ?

Thank you,

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21542
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by X2-Illuminatus » Sat, 10. Aug 19, 17:41

Is the old script file still present in the "addon\scripts" folder but in a .pck format? If so, the game gives precedence to it. If you edit a .pck script file using the script editor, it does not change the .pck-file but rather creates an .xml copy of it.
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend and Nopileos as Kindle e-books! (NOW also available: X3: Yoshiko!)

User avatar
Hairless-Ape
Posts: 98
Joined: Wed, 6. Nov 02, 21:31
xr

Re: [Discussion] Generic X3TC S&M questions III

Post by Hairless-Ape » Sun, 11. Aug 19, 15:38

The script is viewtopic.php?t=383317 by Sebbi08.
It is composed of 2 xml files, both in the /addon/scripts folder.
I think it replaces the normal Mayhem's Cmd.SatellitesMonitoring.Reap.Go command.

When I put them in there, the game seemed to pick them up fine. However, if I make even a simple version number change and reload a saved game, the script editor in-game still thinks it's at V1. If I use the in-game script editor, it does change it properly, and I find the game modifies the actual XML file when I quit. It just doesn't seem to pick up any changes I might make outside the game. I'm doing something wrong. Thanks for the help.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21542
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by X2-Illuminatus » Sun, 11. Aug 19, 15:57

How do you do these changes "outside the game"?

MSCI xml script files (in comparison to MD files) are not designed to be edited in anything but the in-game or a dedicated external Script Editor (like the one from mr.bear). The somewhat readable part at the top of a script file (if you open it in a plain xml or text editor) is just the text meant for the browser view of the script - doubleclicking on a script file in the "scripts" folder or any other folder where the x2script.xsl is present, opens the browser with a readable view of the script code. The actual code, however, is placed between the codearray-tags.
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend and Nopileos as Kindle e-books! (NOW also available: X3: Yoshiko!)

User avatar
Hairless-Ape
Posts: 98
Joined: Wed, 6. Nov 02, 21:31
xr

Re: [Discussion] Generic X3TC S&M questions III

Post by Hairless-Ape » Sun, 11. Aug 19, 22:09

The dedicated external script editor does present a nice Code editing window, devoid of any of the XML Tags present in the raw XML file, but the XML file itself is text and you can open it with a text editor and edit the lines between the codearray-tags as you say. It's just difficult. I did open the XML file in Visual studio AS a binary file to ensure there was no hidden binary information in the file, and sure enough, it's just plain XML text all the way through.

I edited the XML file with Notepad++, and yes, it was painful to look at..

My problem with X-Studio 1.8 at present, is that it doesn't seem to recognize all the commands in this script.
I.E. a call to "display info box: ...." shows up in the X-Studio window as "<Unrecognised Command>". There are several others that it doesn't recognize.
I used the XRCatTool to extract all the cat files to a new folder, but not quite sure how to reference it from within the editor. In X4, it has an "/md/md.xsd" file you can reference in an editor, but I don't see this for X3. The x2script.xsl is just for formatting xml in a readable way, and not for resolving library methods/functions.. at least not that I know of.

I'm fairly certain I changed a benign part of the script using Notepad++ and doing a file compare, I can see only that one simple change and the changed version number.. But it won't load it up the revised script when I load up X3. I'm mainly concerned about the mechanics of why it isn't reloading my script and what I need to do to force it to reload it.. The editor issue is one I would love to solve, but I don't actually think that will change the re-loading issue I'm having.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20602
Joined: Mon, 15. Nov 04, 00:26
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by Cycrow » Mon, 12. Aug 19, 11:12

For the version number, you must change it in both parts of the file. Its near the top in the readable part, and in the codearray.

The actual script itself needs to be changed in the codearray.

As for the unrecognized commands, these were new commands that have been added since X-Studio, you can add custom commands like the new missing ones. I seem to remember someone posting a file with these in

Crackajacka87
Posts: 9
Joined: Sat, 22. Jun 19, 14:50
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by Crackajacka87 » Sat, 24. Aug 19, 11:39

So I'm a complete noob here but I'm trying to look into ways to set races to actually invade other races and conquer sectors but looking through other scripts that has this feature initiated in I cant seem to find any script that shows how it is done or activated... Now I'm not going to directly copy these scripts as they were meant to work for their version of the game but to take inspiration and understanding of how to implement something familiar myself.

User avatar
Joubarbe
Posts: 4162
Joined: Tue, 31. Oct 06, 13:11
xr

Re: [Discussion] Generic X3TC S&M questions III

Post by Joubarbe » Sun, 25. Aug 19, 20:41

Uhhh, you know that's a big feature right? You don't write that in two lines of code... To make everything believable and gameplay-wise interesting will take dozens of scripts (Mayhem has 500). Why don't you download a script that does it for you?

Crackajacka87
Posts: 9
Joined: Sat, 22. Jun 19, 14:50
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by Crackajacka87 » Mon, 26. Aug 19, 18:00

Because of compatibility issues... I was hoping to add in a script or 2 with just the invasion mechanic but if it's too much for a beginner then maybe I should give up and chew down something a little more easier than jumping straight into the deep end lol

User avatar
Joubarbe
Posts: 4162
Joined: Tue, 31. Oct 06, 13:11
xr

Re: [Discussion] Generic X3TC S&M questions III

Post by Joubarbe » Mon, 26. Aug 19, 18:45

STO is propably the most known script on that subject. But it's only about you, as a player, taking over sectors.
I've started Mayhem 4 years ago with about the same project as you. "Just an invasion script" :)

If you have specific questions don't hesitate to create new threads. I think the easier way to make a generic invasion script would be to take existing ships (Military ones for instance) and make them go to a random sector and destroy all stations. But then you would have to rebuild everything in some way.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”