[MOD] Argon Privateer Start v1.3 (XR 3.2)

The place to discuss scripting and game modifications for X Rebirth.

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

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

[MOD] Argon Privateer Start v1.3 (XR 3.2)

Post by Eightbal1 » Fri, 6. Feb 15, 09:33

Thanks to: Yorrick and w.evans and Observe without whom I could not have completed this before my patience ran out.

Mod description:
A new game start for pirates who work for a "legitimate" faction.
"Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped."

Location: Omicron Lyrae, Radiant Haven, Magnificent Templar

Recommended mods to make this game start more interesting:
1. Fake IDs (which gives someone using this gamestart an advantage)
2. Teladi Outpost DLC (hoping to get the constrictor missile in player starting equipment if it isn't bugged anymore)

Can be downloaded here.
Or from the Steam Workshop.

v1.1 added recruits to Skunk "units" inventory.
v1.2 fixed a problem where a few factions were named "Unknown Faction."
v1.3 added 12 Constrictor emp Missiles to Skunk as intended.

Things to do (and figure out how to do) properly:
-add marine officer to skunk for insta boarding capability

Currently works in XR v4.0 HoL.

OP:
I got to thinking, how hard could it be to make a minor game start mod? So armed with my almost complete lack of coding skills and save game xml editing know-how, I went to work on it. I couldn't find any guides, so I took a peek at Yorrick's DeVries Freelancer Start and the starts for Observer's Transcend. However, I still hit a big snag.

The extention shows as "on" in XR main menu, but doesn't show in the new game menu. I figure I made some mistake connecting the main file to the content.xml or something along those lines. Here's what I have thus far. I repeat: this is a work in the very rough throws of progress. Any tips that help would be much appreciated.

Contents of content.xml:

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<content id="PrivStart" name="Privateer Start" description="Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped.

Location: Omicron Lyrae, Devoid Clime Sector, Silent Void" author="Eightball" version="100" date="2.6.2015" save="true">
</content>
and in the same folder PrivStart.xml looks like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
  <gamestart id="PrivStart1" name="Argon Privateer Gamestart" description="Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped.

Location: Omicron Lyrae, Devoid Clime Sector, Silent Void

" image="gamestart_1">
    <location galaxy="xu_ep1_universe_macro" zone="tzonecluster_c_sector11_zone85_macro">
      <position x="2591.88" y="-3262.41" z="42486.8" />
      <rotation yaw="76.2818" pitch="-12.6074" roll="0.0" />
    </location>
    <player macro="player" money="104201">
      <ship macro="unit_player_ship_macro" />
        <upgrade macro="engine_player_bal_mk3_macro" />
        <upgrade macro="shieldgenerator_player_bal_mk2_macro" />

        <upgrade macro="weapon_player_impulse_mk2_macro" />
        <upgrade macro="weapon_player_plasma_mk2_macro" />
        <upgrade macro="weapon_player_shotgun_mk1_macro" />
        <upgrade macro="weapon_player_mining_mk2_macro" />
        <upgrade macro="unit_player_ship_scanner_1_macro" />

        <upgrade macro="upg_pla_software_trc_mk1" />

        <ammo macro="missile_player_empmissle_macro" count="12" />
        <ammo macro="missile_player_guided_macro" count="8" />
        <ammo macro="missile_player_guided_heavy_macro" count="8" />
        <drone macro="unit_player_interceptor_drone_macro" count="4" />
        <drone macro="unit_player_hacker_drone_macro" count="1" />
        <drone macro="unit_player_demolition_drone_macro" count="3" />
--I'm just cutting and pasting from save game files for this next part--
<ware ware="inv_blankidcards" amount="4"/>
<ware ware="inv_omicronvisa" amount="2"/>
<ware ware="inv_albionvisa" amount="2"/>
<ware ware="inv_securitydecryptionsystem" amount="5"/>
<ware ware="inv_smallarms" amount="4"/>
<ware ware="inv_chippeddiamonds" amount="7"/>
<ware ware="inv_hackerchips"/>
<ware ware="inv_blankfreightpapers"/>
      </ship>
    </player>
  </gamestart>
Last edited by Eightbal1 on Sat, 28. May 16, 04:00, edited 15 times in total.

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Fri, 6. Feb 15, 11:14

Initially you need to have certain things in the right place. Your gamestart code has to go in the libraries\gamestart.xml as an xml patch. Also copy/paste from save file probably won't work. The following code goes in your mod dir as 'libraries/gamestarts.xml' :


Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <add sel="/gamestarts">
<gamestart id="PrivStart1" name="Argon Privateer Gamestart" description="Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped./n/nLocation: Omicron Lyrae, Devoid Clime Sector, Silent Void" image="gamestart_1">
    <location galaxy="xu_ep1_universe_macro" zone="tzonecluster_c_sector11_zone85_macro">
      <position x="2591.88" y="-3262.41" z="42486.8" />
      <rotation yaw="76.2818" pitch="-12.6074" roll="0.0" />
    </location>
    <player macro="player" money="104201">
      <ship macro="unit_player_ship_macro" />
        <upgrade macro="engine_player_bal_mk3_macro" />
        <upgrade macro="shieldgenerator_player_bal_mk2_macro" />

        <upgrade macro="weapon_player_impulse_mk2_macro" />
        <upgrade macro="weapon_player_plasma_mk2_macro" />
        <upgrade macro="weapon_player_shotgun_mk1_macro" />
        <upgrade macro="weapon_player_mining_mk2_macro" />
        <upgrade macro="unit_player_ship_scanner_1_macro" />

        <upgrade macro="upg_pla_software_trc_mk1" />

        <ammo macro="missile_player_empmissle_macro" count="12" />
        <ammo macro="missile_player_guided_macro" count="8" />
        <ammo macro="missile_player_guided_heavy_macro" count="8" />
        <drone macro="unit_player_interceptor_drone_macro" count="4"/>
        <drone macro="unit_player_hacker_drone_macro" count="1" />
        <drone macro="unit_player_demolition_drone_macro" count="3"/>
      </ship>
    </player>
  </gamestart> 
  </add>
</diff>
Next you need to patch md/setupgamestarts.xml to link to this new lib entry

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <add sel="/mdscript/cues">
    <cue name="PrivStart">
      <conditions>
        <event_cue_signalled cue="md.Setup.GameStart"/>
        <check_value value="player.module" exact="'PrivStart1'"/>
      </conditions>
      <actions>
        <signal_cue cue="md.Setup.Open_Jumpgates_Lib"/>

        <!--Do not signal instantly-->
        <signal_cue cue="md.Setup.WeaponTraderBasket3"/>
        <signal_cue cue="md.Setup.EquipmentTraderBasket2"/>
        <signal_cue cue="md.Setup.PostChapter3Jobs"/>

        <!-- some example faction stuff here -->
        <!-- Setup up some known factions that would have been discovered in plot -->
        <!--<set_faction_relation faction="faction.player" otherfaction="faction.plutarch" value="faction.player.relation.kill.max" comment="fallback relation change"/>
        <set_faction_relation faction="faction.plutarch" otherfaction="faction.player" value="faction.plutarch.relation.kill.max"/>-->
        <set_faction_relation faction="faction.player" otherfaction="faction.plutarch" value="-0.7"/>
        <set_faction_relation faction="faction.plutarch" otherfaction="faction.player" value="-0.7"/>
        <!-- -0.032 -15 -->
        <set_faction_relation faction="faction.canteran" otherfaction="faction.plutarch" value="faction.canteran.relation.kill.max"/>
        <set_faction_relation faction="faction.plutarch" otherfaction="faction.canteran" value="faction.plutarch.relation.kill.max"/>
        <set_faction_relation faction="faction.reivers" otherfaction="faction.plutarch" value="1"/>
        <set_faction_relation faction="faction.plutarch" otherfaction="faction.reivers" value="1"/>

        <set_faction_relation faction="faction.player" otherfaction="faction.heartofalbion" value="0.32"/>
        <set_faction_relation faction="faction.player" otherfaction="faction.canteran" value="0.32"/>
        <!-- 0.032 = +5-->
        <set_faction_relation faction="faction.player" otherfaction="faction.familyryak" value="0.0032"/>
        <set_faction_relation faction="faction.player" otherfaction="faction.argongovernment" value="0.32"/>
        <set_faction_relation faction="faction.player" otherfaction="faction.jonferson" value="0.0032"/>
        <set_faction_relation faction="faction.player" otherfaction="faction.chow" value="0.0032"/>

        <set_faction_known faction="faction.argongovernment" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.argongovernment.id" />
        <set_faction_known faction="faction.heartofalbion" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.heartofalbion.id" />
        <set_faction_known faction="faction.jonferson" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.jonferson.id" />
        <set_faction_known faction="faction.canteran" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.canteran.id" />
        <set_faction_known faction="faction.reivers" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.reivers.id" />
        <set_faction_known faction="faction.familyryak" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.familyryak.id" />
        <set_faction_known faction="faction.xenon" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.xenon.id" />
        <set_faction_known faction="faction.plutarch" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.plutarch.id" />
        <set_faction_known faction="faction.beryll" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.beryll.id" />
        <set_faction_known faction="faction.chow" known="true"/>
        <add_encyclopedia_entry type="factions" item="faction.chow.id" />

        <!--<add_licence faction="faction.player" licencefaction="faction.plutarch" type="intoxicants"/>
        <add_licence faction="faction.player" licencefaction="faction.plutarch" type="pharmaceuticals"/>-->

        <add_licence faction="faction.player" licencefaction="faction.heartofalbion" type="intoxicants"/>
        <add_licence faction="faction.player" licencefaction="faction.heartofalbion" type="pharmaceuticals"/>

        <add_licence faction="faction.player" licencefaction="faction.argongovernment" type="intoxicants"/>
        <add_licence faction="faction.player" licencefaction="faction.argongovernment" type="pharmaceuticals"/>

        <!-- and setup player inv -->
        <add_inventory entity="player.entity" ware="ware.inv_terranredwine" exact="150" />
	 <add_inventory entity="player.entity" ware="ware.inv_delexianale" exact="150" />
	 <add_inventory entity="player.entity" ware="ware.inv_jonkayeanswhiskey" exact="150" />

      </actions>
    </cue>
  </add>
</diff>
Which should solve your faction and inv issues and demonstrate how to add factions to the encylopedia at game start.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Fri, 6. Feb 15, 11:17

I should add; my solution to starting loc is to search the /t file for your language for the zone name, note the second number and then reference that in zones.xml. The zone macro reference must be done in gamestarts.xml as all lower case or the game crashes and burns (lol).
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 6. Feb 15, 12:11

ta da!
[ external image ]
You had a syntax error in line 9 (line was terminated when the lines following should have been nested within the node so your later </ship> was trying to terminate your <player ... > which was causing the mod to not load at all.)

Also your comment before the series of <ware ... /> lines wasn't correctly formatted as a comment, so the game was trying to read it as code. <!-- --> rather than -- --

And I don't know how Yorrick did it, but Observe did it as a diff patch to gamestarts.xml. So this code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
	<add sel="/gamestarts">
  <gamestart id="PrivStart1" name="Argon Privateer Gamestart" description="Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped.  Location: Omicron Lyrae, Devoid Clime Sector, Silent Void" image="gamestart_1">
    <location galaxy="xu_ep1_universe_macro" zone="tzonecluster_c_sector11_zone85_macro">
      <position x="2591.88" y="-3262.41" z="42486.8" />
      <rotation yaw="76.2818" pitch="-12.6074" roll="0.0" />
    </location>
    <player macro="player" money="104201">
      <ship macro="unit_player_ship_macro">
        <upgrade macro="engine_player_bal_mk3_macro" />
        <upgrade macro="shieldgenerator_player_bal_mk2_macro" />

        <upgrade macro="weapon_player_impulse_mk2_macro" />
        <upgrade macro="weapon_player_plasma_mk2_macro" />
        <upgrade macro="weapon_player_shotgun_mk1_macro" />
        <upgrade macro="weapon_player_mining_mk2_macro" />
        <upgrade macro="unit_player_ship_scanner_1_macro" />

        <upgrade macro="upg_pla_software_trc_mk1" />

        <ammo macro="missile_player_empmissle_macro" count="12" />
        <ammo macro="missile_player_guided_macro" count="8" />
        <ammo macro="missile_player_guided_heavy_macro" count="8" />
        <drone macro="unit_player_interceptor_drone_macro" count="4" />
        <drone macro="unit_player_hacker_drone_macro" count="1" />
        <drone macro="unit_player_demolition_drone_macro" count="3" />
<!--I'm just cutting and pasting from save game files for this next part-->
<ware ware="inv_blankidcards" amount="4"/>
<ware ware="inv_omicronvisa" amount="2"/>
<ware ware="inv_albionvisa" amount="2"/>
<ware ware="inv_securitydecryptionsystem" amount="5"/>
<ware ware="inv_smallarms" amount="4"/>
<ware ware="inv_chippeddiamonds" amount="7"/>
<ware ware="inv_hackerchips"/>
<ware ware="inv_blankfreightpapers"/>
      </ship>
    </player>
  </gamestart>
	</add>
</diff>
in \libraries\gamestarts.xml worked. (Didn't try it past the new game screen though. Will try that now.)

ps. Oh, hi Yorrick. Didn't notice your comments until after I posted.

pps. Yup. Without Setup_gamestarts.xml, the new gamestart wouldn't start at all. Started to load, then got spit back out to the main menu.

ppps.
debuglog wrote:[=ERROR=] LookupKeyName::LookupName(): The key name "ware" is not recognized in lookup 'GameStartXML'. Originated from: "libraries/gamestarts.(pck|xml)"
Trimmed out the <ware ... /> lines.

Also:
debuglog wrote:[=ERROR=] Unable to start game. Player zone 'tzonecluster_c_sector11_zone85_macro' not found in gamestart 'PrivStart1'.
There's a tzonecluster_c_sector11_zone75_macro. Did you mean that?

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Fri, 6. Feb 15, 14:50

Thanks, Yorrick!
I think I did all that correctly. I now have an extention folder for my mod with a content.xml and two other folders for "md" and "libraries" with the gamestarts.xml (edit: previously PrivStart.xml) in "libraries" and the setupgamestarts.xml (edit: now renamed setup_gamestarts.xml) in the other. Not sure if that's what you meant by patching. I haven't gotten into how to make them into .cat/.dat yet if that's what I need to do last.

w.evans! You're too kind! I love the screenshot! Yeah those ware lines were just thrown in as I wrote the forum post itself. I kept them fully commented when I tried it after posting. I'll try to sort out those syntax problems now. When you say you put it in libraries/gamestarts.xml is that in the extention folder for the mod itself or something else like a .dat? The spawn location for the player was an educated guess based on Roguey's map. I just was looking at the main game .cat files and stumbled upon the locations while you were replying. So yeah, I guess 85 doesn't exist. I'll just write in 82 for now until I can figure out where Silent Void's zone number is. Probably on the ingame map, right?

edit: woohoo! it worked! I'm in Radiant Heaven someplace, not devoid clime. And my gamestart didn't seem to work completely as I have no inventory or shields, but my guns and missles are equipped. didn't check much else out yet. Finally! That was cool to see it in the menu finally. I chopped off the "Gamestart" from the menu title too.
Last edited by Eightbal1 on Fri, 6. Feb 15, 16:53, edited 3 times in total.

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Fri, 6. Feb 15, 15:04

cat/dat build is only needed for uploading to steam workshop :) what i meant by patching is the <diff> etc tags that essentially do an edit of the original game files from the xml you provide at game startup. this allows us to add/remove/change specific items in the original xml while not replacing it fully.

edit : to be clear - if your mod is not using the diff/add tags as shown abvpve you will break the rest of the gamestarts and probably more.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Fri, 6. Feb 15, 15:06

ahh hence your add sel command line
Thanks!

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Fri, 6. Feb 15, 15:25

YorrickVander wrote:edit : to be clear - if your mod is not using the diff/add tags as shown abvpve you will break the rest of the gamestarts and probably more.
not really. if you just add stuff directly under the root node you can also use a merge file.
For example the behavior of these two as Extension for an Existing file is identical: (…… is the new stuff)

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<diff>
  <add sel="/root_node" >……</add>
<diff>

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<root_node>……</root_node>
but the second one also has the Advantage that you can use the xsds directly ^^

This only works directly under the root node - if you add stuff somewhere else or you want to replace/remove you must use an xml diff file.
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 ;)

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Fri, 6. Feb 15, 16:34

Well, I'm done for today, but pretty satisfied with how it's shaping up thanks to you real modders.

Current status is that the items, licenses, and known factions are absent from the player's profile at start. But the skunk's gear and drones are all present (except for the targeting computer and shield boost drone whose macros escape me for the moment). Haven't gotten into trying to set reputations yet. I might leave that mostly alone. I might also change the cockpit to the Jonferson's one.

Here's the setup_gamestarts.xml so far:

Code: Select all

<?xml version="1.0" encoding="utf-8"?> 
 <diff> 
   <add sel="/mdscript/cues"> 
     <cue name="PrivStart"> <!--or should this be PrivStart1 as well? it doesn't seem to change the game either way-->
       <conditions> 
         <event_cue_signalled cue="md.Setup.GameStart"/>  <!-- should 'cue=' be the path for setup_gamestarts.xml? -->
         <check_value value="player.module" exact="'PrivStart1'"/> 
       </conditions> 
       <actions> 
         <signal_cue cue="md.Setup.Open_Jumpgates_Lib"/> <!-- are these cues calling for files in my mod dir or the base game? -->
         
         <signal_cue cue="md.Setup.WeaponTraderBasket3"/> 
         <signal_cue cue="md.Setup.EquipmentTraderBasket2"/> 
         <signal_cue cue="md.Setup.PostChapter3Jobs"/> 

         <set_faction_known faction="faction.argongovernment" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.argongovernment.id" />
	<set_faction_known faction="faction.jonferson" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.jonferson.id" />
         <set_faction_known faction="faction.xenon" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.xenon.id" /> 

		 <!-- setup player licenses, if any -->
         <add_licence faction="faction.player" licencefaction="faction.argongovernment" type="police"/> <!-- "police" right? -->
         
         <!-- and setup player inv --> 
         <add_inventory entity="player.entity" ware="ware.inv_blankidcards" exact="4" /> 
		 <add_inventory entity="player.entity" ware="ware.inv_albionvisa" exact="2" /> 
		 <add_inventory entity="player.entity" ware="ware.inv_securitydecryptionsystem" exact="6" /> 
		 <add_inventory entity="player.entity" ware="ware.inv_blankfreightpapers" exact="1" />
		 <add_inventory entity="player.entity" ware="ware.inv_hackerchips" exact="2" />
		 <add_inventory entity="player.entity" ware="ware.inv_smallarms" exact="4" />
	 
       </actions> 
     </cue> 
   </add> 
 </diff> 

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 6. Feb 15, 17:27

Eightbal1 wrote:Well, I'm done for today, but pretty satisfied with how it's shaping up thanks to you real modders.
Welcome, real modder!
Eightbal1 wrote:Current status is that the items, licenses, and known factions are absent from the player's profile at start.
Known factions is this, isn't it?
Eightbal1 wrote:

Code: Select all

         <set_faction_known faction="faction.argongovernment" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.argongovernment.id" />

         <set_faction_known faction="faction.jonferson" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.jonferson.id" />

         <set_faction_known faction="faction.xenon" known="true"/> 
         <add_encyclopedia_entry type="factions" item="faction.xenon.id" /> 
unless you wanted to add more factions.

edit: Ah, I see that you have items and licenses as well. I guess that you meant that you want to add more of them then.
Eightbal1 wrote:Haven't gotten into trying to set reputations yet. I might leave that mostly alone.
Relations are set by:

Code: Select all

<set_faction_relation faction="faction.player" otherfaction="faction.argongovernment" value="faction.player.relation.member.min" comment="fallback relation change"/>
Valid relations are:
libraries\common.xsd wrote: <xs:enumeration value="dock" />
<xs:enumeration value="enemy" />
<xs:enumeration value="friend" />
<xs:enumeration value="kill" />
<xs:enumeration value="killmilitary" />
<xs:enumeration value="member" />
<xs:enumeration value="nemesis" />
<xs:enumeration value="neutral" />
<xs:enumeration value="self" />
Hm. I wonder what

Code: Select all

<set_faction_relation faction="faction.player" otherfaction="faction.plutarch" value="faction.player.relation.self.min"/>
will do.

To your in-code questions:
Eighbal1 wrote:<!--or should this be PrivStart1 as well? it doesn't seem to change the game either way-->
Doesn't matter. You can call that cue whatever you like.
Eighbal1 wrote:<!-- should 'cue=' be the path for setup_gamestarts.xml? -->
Sorry, didn't understand this question, but that particular command makes the running of this cue contingent upon the GameStart cue in the file Setup.xml in the folder [md] running.
Eighbal1 wrote:<!-- are these cues calling for files in my mod dir or the base game? -->
In this case, the base game. This one is calling the cue Open_Jumpgates_Lib in md\Setup.xml
Eighbal1 wrote:<!-- "police" right? -->
Yup. Other licenses are:
libraries\common.xsd wrote: <xs:enumeration value="intelligence" />
<xs:enumeration value="military" />
<xs:enumeration value="police" />
<xs:enumeration value="hazardousmaterials" />
<xs:enumeration value="intoxicants" />
<xs:enumeration value="pharmaceuticals" />
<xs:enumeration value="protectedspecies" />

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Sat, 7. Feb 15, 01:50

edit: Ah, I see that you have items and licenses as well. I guess that you meant that you want to add more of them then.
Yes, but I meant also that none of the add factions/items/and licenses commands were actually working. When I get the gamestart started Ren is lacking those things assigned in setup_gamestarts.xml. So that's why I'm asking these in-code questions (because I'm looking for inconsistencies in the code that might be causing this):
Eighbal1 wrote:
<!--or should this be PrivStart1 as well? it doesn't seem to change the game either way-->

Doesn't matter. You can call that cue whatever you like.
Oh ok. I think the next questions are answered for me then.
Eighbal1 wrote:
<!-- should 'cue=' be the path for setup_gamestarts.xml? -->

Sorry, didn't understand this question, but that particular command makes the running of this cue contingent upon the GameStart cue in the file Setup.xml in the folder [md] running.
Sorry didn't understand this answer (lol). Basically just asking whether it is calling for a file in my mod that I need to name exactly as the cue, but I guess not.
Eighbal1 wrote:
<!-- are these cues calling for files in my mod dir or the base game? -->

In this case, the base game. This one is calling the cue Open_Jumpgates_Lib in md\Setup.xml
Last question:
How do you search the assets in the base game for the proper macros? I mean, how did you get "libraries\common.xsd" to write those things? I've just been going through directory after directory in the .cat files of the base game with the CAT tool (which doesn't seem to have a search option to find what I need). I still need to figure out macros for shield support drone and targeting software after I get setup_gamestarts.xml to work.

question after the last one:
there's a <diff> line I see in a lot of people's mod code at the start. some website address with w3.org in it. Is that what I'm missing?

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Sat, 7. Feb 15, 05:44

Searching the xml - I use the official gui version of the cat/dat extractor to extract the whole game (http://forum.egosoft.com/viewtopic.php?t=363625) and notepad++ with it's 'search files' option as windows 7 search is a bit sh*t.

The w3org/diff thing is a bit more complex and unitrader would do a much better job of explaining it :) Essentially though <diff></diff> block is telling the xml engine that this file is a patch file intended to change the xml it reads from cat/dat at game load. Tuorial here http://forum.egosoft.com/viewtopic.php?t=354310.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Setup_Gamestarts.xml

Post by Eightbal1 » Sat, 7. Feb 15, 14:00

My setup_gamestarts.xml file is still not apparently executing. None of the effects I have as actions to do in that file are operating. The player at start has no license, the inv and faction list is empty, and worst of all the gates aren't active. I've tried a number of things by comparing core files and other mods, but I guess I'm still shooting in the dark.

On the bright side I finally found the macro for targeting computer and that's activating just fine. All that's left for skunk eq is the shield drone, whose macro must be really obscure (so of course I'm even more curious about what it is than actually having in my gamestartmod). It's not turning up after an hour of searching. I wouldn't even care though if the setup_gamestart would just execute correctly. I guess I need to figure out how to get the debugger working.

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Sat, 7. Feb 15, 14:17

the buglog says two things when I'm starting a new game as a Privateer
[gamestart: 38] - [02/07/15 13:05:14]: Error: [Movie.LoadFormat] File videos/logo_publisher.mkv: File not found
and then it says something interesting
[gamestart: 39] - [02/07/15 13:06:47]: Error: Error loading from XML merge/patch file 'md\setup_gamestarts.xml'. Check the log for further information. Skipping file.
It says I messed up with comments within comments. Gunna clean up that file's comments first and see if that does the trick.

EDIT: Bingo! That was the only problem! Privateer is off the ground.

Also EDIT: Great! Um, now where do I put it? Guess I'll try nexus until I go through the steam workshop tutorial.
Last edited by Eightbal1 on Sat, 7. Feb 15, 14:50, edited 1 time in total.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 7. Feb 15, 14:50

[ external image ]
[ external image ]
Seems to be working. I don't know if the files are case-sensitive, Setup_gamestarts.xml is with a capital 'S' in the vanilla files, so it's named that way in my copy as well. And I removed the line endings in your gamestarts.xml:

Code: Select all

<gamestart id="PrivStart1" name="Argon Privateer Gamestart" description="Embark on your maiden voyage as a Privateer, fighting for Argon interests and against Albion or Terran factions. You are equipped by your Argon benefactors for combat missions, covert sabotage, and piracy. You're wallet, however, is not so well equipped. Location: Omicron Lyrae, Devoid Clime Sector, Silent Void" image="gamestart_1">
Not sure if that made a difference, though. Otherwise, copied-pasted from the code that you posted.

The menus do occasionally freeze when trying to look at ship details [Enter -> 2 -> 3], so there might be something wrong still in Setup_gamestarts.xml, but otherwise, appears to be working as you intended.

edit: Sorry, missed this:
Eightbal1 wrote:
w.evans wrote:
Eightbal1 wrote:<!-- should 'cue=' be the path for setup_gamestarts.xml? -->
Sorry, didn't understand this question, but that particular command makes the running of this cue contingent upon the GameStart cue in the file Setup.xml in the folder [md] running.
Sorry didn't understand this answer (lol). Basically just asking whether it is calling for a file in my mod that I need to name exactly as the cue, but I guess not.
Heh. Sorry about that. Meant that <cue name="PrivStart"> will first check to see if <cue name="GameStart" onfail="cancel"> in md\Setup.xml has been triggered. If it has, then that condition will be fulfilled. If both of the conditions specified under <conditions> ... </conditions> are fulfilled, then <cue name="PrivStart"> would trigger.

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

It's alive!

Post by Eightbal1 » Sat, 7. Feb 15, 15:38

The problem was in the comment lines commands I had used. I was doing it wrong. So my setup file wouldn't even run. All clear now though! I'm uploading it on Nexus now and figuring out Workshop another time.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sat, 7. Feb 15, 17:17

Congrats! But you seem to have forgotten to pack your content.xml.

User avatar
YorrickVander
Posts: 2702
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander » Sat, 7. Feb 15, 17:20

Good work :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Eightbal1
Posts: 41
Joined: Wed, 7. Jan 15, 03:13
x4

Post by Eightbal1 » Sun, 8. Feb 15, 08:30

Yeah I did forget the content.xml. I had taken it out in my tinkering and set it aside. I thought maybe it was for the Workshop but maybe nexus mod manager uses it too? The mod doesn't work when I download it using NMM.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 8. Feb 15, 09:56

I didn't try downloading it using NMM, but when I just downloaded it manually, extracted it to my extensions folder, and made a content.xml for it, worked just fine.

Post Reply

Return to “X Rebirth - Scripts and Modding”