[Discussion] Generic X3TC S&M questions II
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
-
- Posts: 1827
- Joined: Wed, 6. Nov 02, 20:31
I have the MSCIHandbook by Kurtz Fizner, is that the one you are looking for?
Edit:
Here's a link to the XAI Corp online version through Google cache:
Link
Better to copy it to your hard drive as you never know how long it will be in cache for or if Xai will be back up.
HTH
Argo.
Edit:
Here's a link to the XAI Corp online version through Google cache:
Link
Better to copy it to your hard drive as you never know how long it will be in cache for or if Xai will be back up.
HTH
Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>
XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F
I lurk alot for the most part now

<==<<Argonaught>>==>
XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F
I lurk alot for the most part now

-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
Thank you very much, this is exactly what I need.Argonaught. wrote:I have the MSCIHandbook by Kurtz Fizner, is that the one you are looking for?
Edit:
Here's a link to the XAI Corp online version through Google cache:
Link
Better to copy it to your hard drive as you never know how long it will be in cache for or if Xai will be back up.
HTH
Argo.
Fantasy is the impossible made probable. Science fiction is the improbable made possible.
-
- EGOSOFT
- Posts: 12099
- Joined: Fri, 21. May 04, 17:15
Abandoned ships are a PITA.dillpickle wrote:I am using MD to create an abandoned TP, and want it to have some Marines in it's cargo. The marines are showing up, except they are all named 'Unknown Object' with their race as 'Neutral'.
Try this workaround:
Create the ship race=argon
force the pilot to bail
destroy the pilot
add stuff to the ship, like cargo, equipment, etc..
MFG
Ketraar

-
- Moderator (Script&Mod)
- Posts: 22410
- Joined: Sun, 14. Nov 04, 23:26
Page ids are 4 digits the first 2 are the game the text was added inScRaT_GER wrote:No, you can't. Object names are always on page 17 - for the game.17 to another number
Why this appendix "for the game"? Because you also have the possibilty to define object names on pages 300017 and 350017 (not sure about the last one, you simply have to check what Egosoft did). These pages are read into page 17 by the game.
I don't know why Egosoft created this weird mechanism, since it is absolutely no problem to define new object names directly on page 17.
One other thing to know is, that the objects description is always one ID after the objects name.Greetings,Code: Select all
<page id="17"> <t id="50000">OBJECT NAME</t> <t id="50001">OBJECT DESCRIPTION</t> </page>
ScRaT
30 is for the game engine 3.0 which is x3 reunion
Any page starting with 30 was added in reunion
35 is game engine 3.5 which is terran conflict
If you change something in page 17 it will be overrided by the same I'd in 350017 of it exists
-
- Posts: 1827
- Joined: Wed, 6. Nov 02, 20:31
So page id's act kinda like cat/dat numbers, better to use the highest version number to make sure it's used? so for object name/descriptions it'll be page id="****17".Cycrow wrote:Page ids are 4 digits the first 2 are the game the text was added inScRaT_GER wrote:No, you can't. Object names are always on page 17 - for the game.17 to another number
Why this appendix "for the game"? Because you also have the possibilty to define object names on pages 300017 and 350017 (not sure about the last one, you simply have to check what Egosoft did). These pages are read into page 17 by the game.
I don't know why Egosoft created this weird mechanism, since it is absolutely no problem to define new object names directly on page 17.
One other thing to know is, that the objects description is always one ID after the objects name.Greetings,Code: Select all
<page id="17"> <t id="50000">OBJECT NAME</t> <t id="50001">OBJECT DESCRIPTION</t> </page>
ScRaT
30 is for the game engine 3.0 which is x3 reunion
Any page starting with 30 was added in reunion
35 is game engine 3.5 which is terran conflict
If you change something in page 17 it will be overrided by the same I'd in 350017 of it exists
Does this mean in TC since it's using 350017 (if it exists) could I use a higher number as long as it ended with 17?
Either way it's good info to have. Thanks Cycrow.
Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>
XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F
I lurk alot for the most part now

<==<<Argonaught>>==>
XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F
I lurk alot for the most part now

I have a question about installing .zip files..
I DL'd IF and unzipped everything into the right folders... now how do I get it to run? I've installed Plugin Manager Lite, and it can't find the mod, I tried to open the script menu, and couldn't find an IF execute line.
What am I missing in the .zip install process?
{duplicate post tidied - Carlo}
I DL'd IF and unzipped everything into the right folders... now how do I get it to run? I've installed Plugin Manager Lite, and it can't find the mod, I tried to open the script menu, and couldn't find an IF execute line.
What am I missing in the .zip install process?
{duplicate post tidied - Carlo}
-
- Posts: 2255
- Joined: Mon, 31. Oct 05, 08:44
Question
Optimisation questions.
I have a couple of queries about what is the most efficient approach to a situation and about the capacity of the game engine.
First off the game engine:
Is there a limit to the number of task an object can run. Obviously less equals better as far as CPU load goes but nothing would happen in-game. Is there a known tipping point.
Which approach is better as far as game performance:
Option 1:
Storing values as local variables on an object and updating/referring to the variable for check.
Example would be Variable Prefix + object ID + Offset will give a unique ref for a local variable stored on the object. This unique ref is then called as needed either to check the value or update.
I current use this option in FDN, SSDN & PM.
(Do game objects have a limit to the number of local variables it will hold)
Option 2:
Storing related values in an array on the object and then using that array to queried values, or updated as needed.
An example would be a configuration string made-up of Integer and Array values stored as a local variable or even within another Array and the values pulled from, referred to and updated from there.
From my limited knowledge there is always going to be a processing overhead when working with Arrays especially nested Arrays. Hence I have used option 1 quite a lot over option 2, rather than work a lot in nested Arrays, although I work with nested arrays for global variable to create dynamic menus.
Maybe I've taken the wrong approach, or both of the above are wrong.
Thanks in advance.
LA
I have a couple of queries about what is the most efficient approach to a situation and about the capacity of the game engine.
First off the game engine:
Is there a limit to the number of task an object can run. Obviously less equals better as far as CPU load goes but nothing would happen in-game. Is there a known tipping point.
Which approach is better as far as game performance:
Option 1:
Storing values as local variables on an object and updating/referring to the variable for check.
Example would be Variable Prefix + object ID + Offset will give a unique ref for a local variable stored on the object. This unique ref is then called as needed either to check the value or update.
I current use this option in FDN, SSDN & PM.
(Do game objects have a limit to the number of local variables it will hold)
Option 2:
Storing related values in an array on the object and then using that array to queried values, or updated as needed.
An example would be a configuration string made-up of Integer and Array values stored as a local variable or even within another Array and the values pulled from, referred to and updated from there.
From my limited knowledge there is always going to be a processing overhead when working with Arrays especially nested Arrays. Hence I have used option 1 quite a lot over option 2, rather than work a lot in nested Arrays, although I work with nested arrays for global variable to create dynamic menus.
Maybe I've taken the wrong approach, or both of the above are wrong.
Thanks in advance.
LA
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
There is no real limit, at least no one, you'll ever reach.Is there a limit to the number of task an object can run.
I don't think there is a big difference, but the array version is probably a little faster.Option 1:
Storing values as local variables on an object and updating/referring to the variable for check.Option 2:
Storing related values in an array on the object and then using that array to queried values, or updated as needed.
From the programming point of view, a local variable maps a string to a value. A string is a quite "big" object.
An array is simply a sequence of values and if it is implemented ideally, all values lie directly behind each other in memory and can thus be easily referenced.
So using local variables might need more space and they are likely to be a little slower.
It all depends on implementation however, so I guess only Cycrow might have a definitve answer.
Greetings,
ScRaT
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
As long as you keep using an object/array, the array pointer remains valid so you don't need to re-fetch the array or local array.
Single-value local vars are "real" variables. You read their value and lose contact.
If you fetch a local array, all changes to it are instantly visible to all scripts currently using it. That can be useful.
Depending on the frequency of the checks and who or what accesses the data, each way can be better so it's impossible to tell without knowing what you're up to.
Single-value local vars are "real" variables. You read their value and lose contact.
If you fetch a local array, all changes to it are instantly visible to all scripts currently using it. That can be useful.
Depending on the frequency of the checks and who or what accesses the data, each way can be better so it's impossible to tell without knowing what you're up to.
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.
-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
I been trying to replace an existing sector with out restarting, but I've gotten stuck. Any help is greatly welcomed.
Here's my thinking:
1. I need to replace a Khaak 841
2. I create a map with just that sector, at the same coordinates as a vanilla version.
3. Named that map file fix.xml
4. Placed it in my X3TC /maps directory.
5. Used the code below to load it, if the player changes his name to "fix"
Result: Nothing happens 
Here's my thinking:
1. I need to replace a Khaak 841
2. I create a map with just that sector, at the same coordinates as a vanilla version.
3. Named that map file fix.xml
4. Placed it in my X3TC /maps directory.
5. Used the code below to load it, if the player changes his name to "fix"
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="MapFix" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<cues>
<cue name="Loadmap_fix" comment="">
<condition>
<check_all>
<check_value value="{player.name}" exact="fix" comment=""/>
</check_all>
</condition>
<timing>
<time exact="2s"/>
</timing>
<action>
<do_all>
<load_map file="fix" comment="map name WITHOUT file extension"/>
</do_all>
</action>
</cue>
</cues>
</director>

Fantasy is the impossible made probable. Science fiction is the improbable made possible.
-
- EGOSOFT
- Posts: 12099
- Joined: Fri, 21. May 04, 17:15
Note that load_map ONLY ADDS stuff. Also note that your game needs to be modified when loading MD files (just making sure).
The location for the code posted here is the \director folder, not maps. (sounds like a stupid thing to say, just making sure.)
Should this still not solve your issue please post both files (not the code) in here and I'll have a look if you like.
MFG
Ketraar
The location for the code posted here is the \director folder, not maps. (sounds like a stupid thing to say, just making sure.)
Should this still not solve your issue please post both files (not the code) in here and I'll have a look if you like.
MFG
Ketraar

-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
I think that explains it, thank you Ketraar. Basically what I been trying to do is replace a broken Khaak 841, which has 2 extra planets. So if I use load_map it won't replace the sector completely, I just tried it my adding a gate in one test (worked) and then my removing a station in another (didn't work). Thank you for clarifying this for me.Ketraar wrote:Note that load_map ONLY ADDS stuff.
Fantasy is the impossible made probable. Science fiction is the improbable made possible.
-
- EGOSOFT
- Posts: 12099
- Joined: Fri, 21. May 04, 17:15
np
You could use the find_planet to reference the planet you want to remove and then apply destroy_object to it to remove. Trigger load_map with the changes after you removed the objects that need to be replaced.
Note that you also can directly add_planets to sector or changing backgrounds directly with MD, but you still need to remove the existing ones first.
MFG
Ketraar
You could use the find_planet to reference the planet you want to remove and then apply destroy_object to it to remove. Trigger load_map with the changes after you removed the objects that need to be replaced.
Note that you also can directly add_planets to sector or changing backgrounds directly with MD, but you still need to remove the existing ones first.
MFG
Ketraar

-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
Would something like this work?
Or would it be like this?
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="MapFix" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<cues>
<cue name="khaak_fix" comment="its imperative that you use a custom name">
<condition>
<check_all>
<check_value value="{player.name}" exact="fix" comment=""/>
</check_all>
</condition>
<timing>
<time exact="2s"/>
</timing>
<action>
<do_all>
<find_planet name="this.broken1" typename="planet">
<sector x="14" y="12"/>
</find_planet>
<destroy_object object="this.broken1">
</destroy_object>
<find_planet name="this.broken2" typename="planet">
<sector x="14" y="12"/>
</find_planet>
<destroy_object object="this.broken2">
</destroy_object>
</do_all>
</action>
</cue>
</cues>
</director>
Code: Select all
<do_all>
<find_planet name="this.broken1" typename="7">
<sector x="14" y="12"/>
</find_planet>
<destroy_object object="this.broken1">
</destroy_object>
Fantasy is the impossible made probable. Science fiction is the improbable made possible.
-
- EGOSOFT
- Posts: 12099
- Joined: Fri, 21. May 04, 17:15
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="MapFix" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<cues>
<cue name="khaak_fix" comment="its imperative that you use a custom name">
<condition>
<check_all>
<check_value value="{player.name}" exact="fix" comment=""/>
</check_all>
</condition>
<timing>
<time exact="2s"/>
</timing>
<action>
<do_all>
<find_object group="this.broken1" category="planet" typename="SS_PL1">
<sector x="14" y="12"/>
</find_object>
<find_object group="this.broken1" category="planet" typename="SS_PL100">
<sector x="14" y="12"/>
</find_object>
<destroy_group group="this.broken1" explosion="0"/>
</do_all>
</action>
</cue>
</cues>
</director>
Also note that I've set the referencing to group instead of name. Every planet found should get added to that group and therefore destroyed by the destroy_group action.
Also note that you need to put the typename as in SS_PL_* for the planet, you may need to look it up in map file first.
MFG
Ketraar

-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
Thank you Ketraar, but there seems to be something missing I tried destroying planets in Kingdon End (which are with are type 4 and subtype 56, 68, and 126 in my game) with
and with this
Nothing happens 
Code: Select all
<do_all>
<find_object group="this.broken1" category="planet" typename="SS_PL_56">
<sector x="0" y="0"/>
</find_object>
<find_object group="this.broken1" category="planet" typename="SS_PL_68">
<sector x="0" y="0"/>
</find_object>
<find_object group="this.broken1" category="planet" typename="SS_PL_126">
<sector x="0" y="0"/>
</find_object>
<destroy_group group="this.broken1" explosion="0"/>
</do_all>
Code: Select all
<do_all>
<find_object group="this.broken1" category="planet" typename="SS_PL56">
<sector x="0" y="0"/>
</find_object>
<find_object group="this.broken1" category="planet" typename="SS_PL68">
<sector x="0" y="0"/>
</find_object>
<find_object group="this.broken1" category="planet" typename="SS_PL126">
<sector x="0" y="0"/>
</find_object>
<destroy_group group="this.broken1" explosion="0"/>
</do_all>

Fantasy is the impossible made probable. Science fiction is the improbable made possible.
-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
I just discovered something.
In 07.cat/types/Tplanets earth is designated as subtype 140, while is doubleshadows galaxy editor it has designation of 139, a lot of the planets seem to be one number off. Maybe this is the root of the problem?
In 07.cat/types/Tplanets earth is designated as subtype 140, while is doubleshadows galaxy editor it has designation of 139, a lot of the planets seem to be one number off. Maybe this is the root of the problem?
Fantasy is the impossible made probable. Science fiction is the improbable made possible.