[TUTORIAL] X Rebirth - Modding Guide

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

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

mbhm
Posts: 78
Joined: Wed, 21. Mar 07, 18:13
x4

Post by mbhm » Sun, 26. Jan 14, 22:16

I'll have a look at it. But i'm not sure it would work. What i had in mind was some 'Trading system uplink' that would enable the trading computer to link into the local network. That way he not only would get the normal trade offers for a single station, but at the same time all offers from all neutral/friendly stations in that sector.

That way you'd only have to fly to one station to get the normal offers. You'd only have to fly to another station of that sector, if you wanted to scan it for discounts.

By the way, i search for some possibility to create my own menu. I had that silly idea of something like that AL-Menu, where mods could put some settings, that change the behavior of that mod.

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

Post by YorrickVander » Mon, 27. Jan 14, 11:00

I'm doing pretty much that in copilot convo mod. The code specific is :

Code: Select all

<find_sell_offer space="player.zone" multiple="true" result="$SellOffers" />
            <do_all exact="$SellOffers.count" counter="$i" >
              <add_trade_offer object="player.primaryship" tradeoffer="$SellOffers.{$i}"/>
            </do_all>

            <find_buy_offer space="player.zone" multiple="true" result="$BuyOffers" />
            <do_all exact="$BuyOffers.count" counter="$i" >
              <add_trade_offer object="player.primaryship" tradeoffer="$BuyOffers.{$i}"/>
            </do_all>
Which scans all stations in your zone and adds the prices to your trade comp. The space= part can be player.zone, player.sector, player.cluster (system), player.galaxy.

There is no way for this to filter out enemy stations afaik.

EDIT : I wouldn't reccomend using this alongside UniTrader's Info Broker mod, as I think reading station data at same time as the npc does might very well cause problems. I haven't found a reliable way to test this though as it would be a matter of lucky/unlucky timing.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

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

Post by UniTrader » Mon, 27. Jan 14, 12:39

i dont think it would cause any problems since a) the scan is very occasional (1 hour currently per Build Step) and B) it wouldnt ovwerwrite anything. and regarding asking for enemy Station (written from my head, not completely sure about exact syntax):

$station.relationto.{player.primaryship} (or player.faction )


PS @Yorrick did you test adding trade offers to the playership in the long run? never did that because i saw a possibility it could irritate the NPCs since multiple Objects can offer the same Trade and from my understanding the Trader Ships will fly to the nearest place this Trade is available so after a while you could have a dozen trader ships following you around and trying to sell you something
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 ;)

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

Post by YorrickVander » Mon, 27. Jan 14, 13:36

Yeah I've been using this code for some time now as a basis for making trades work - the GTN mod to dump to db was part of the same thing i've been doing at home. No npc has ever tried to trade with me and no offer has ever been flagged as on my ship.

EDIT : afaik that function does not add an offer as in 'add a place to buy/sell from' rather it adds offer to computers memory for ordering ships (shift-t/main menu 4)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

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

Post by UniTrader » Mon, 27. Jan 14, 16:12

well, it is actually used for that.. the sideeffect i use is that Trades on an Object in Player posession remain in memory, though its not the purpose of that command ;)
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 ;)

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

Post by YorrickVander » Mon, 27. Jan 14, 19:37

Will have to look more closely at the repercussions of using this system then. Cheer Uni.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Tue, 4. Feb 14, 18:32

Have a important question: I'm very bad in scripting, for my extension coming soon I looked at different other Mods who show me how it has to be so that it works, but now I have no Idea:

Want to replace the broken gate in Albion/DeVries with the intact version in OL, depending on Informations from Helge T. Kautz' novels where the encyclopedia based on.

Copied the macro for the Gate into my extensions folder (preserved file path) and changed the entry in this file from gate to gate_b. But it does nothing. In which file I have to write that he reads this file and what form should the entry in this other file have?
greetings, MJ Fire

IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven » Tue, 4. Feb 14, 21:40

Well i have not tested this but out of my understanding going into

\maps\XU_ep1_universe\zones.xml

then search for the Gate Sectors (Unitrader uploaded a Mod Tool collection, and it also hold a complete Zone-List) and change

(this one is for DeVries Twilight Sentinel, numbers might be different for Albion)

Code: Select all

      <connection name="clustergate_connection6319" ref="gates">
        <offset>
          <position x="4674.6616210938" y="0" z="9867.1875" />
          <quaternion qx="0" qy="2.384e-07" qz="0" qw="1" />
        </offset>
        <macro ref="props_gates_anc_gate_macro" connection="space" />
      </connection>
to:

Code: Select all

      <connection name="clustergate_connection6319" ref="gates">
        <offset>
          <position x="4674.6616210938" y="0" z="9867.1875" />
          <quaternion qx="0" qy="2.384e-07" qz="0" qw="1" />
        </offset>
        <macro ref="props_gates_anc_gate_b_macro" connection="space" />
      </connection>
props_gates_anc_gate_macro => props_gates_anc_gate_b_macro
At least i think that it should work that way.

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Tue, 4. Feb 14, 23:47

Thanks! :thumb_up:
But when I manipulate the map, will it work with the savegames? Think, the will also be saved in the savegame because the universe changes... :wink:

But I know that only the macros are written in savegame and map- and I know that manipulating the macro entry or the macro itself is possible. Its important for me changing something so that this changing will be seen in every game and also in the savegames, so that me and every person installing the mod can see the 'full package'- without the needs to start a new game. Changing the macro itself so that it uses the gate_b instead of gate is the easiest way.

Another way is to replace the original object scene xml, but again I don't know where the entry has to put in, that the Game reads from the xml in the extension- is it the components.xml- the same entry as for the clusters?
greetings, MJ Fire

IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven » Wed, 5. Feb 14, 00:12

I am using this for my Real War Mod.

is just deleted the macro for the jump beacon in twilight sentinel and copy and pasted it into Crimson Rocks.

Restarting Game

Reloading Old Save Game

Jump Beacon moved from Twilight Sentinel to Crimson Rocks.


So changes in the zone.xml will be updated on gameload with your savegame.

(Same should work for jumpgates too (but would probably break their "warp" connection as they are referenced by secor in the galaxy.xml and would probably break the plot)

Dunno about stations though.

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Wed, 5. Feb 14, 00:25

Edit: Finally got it- the same way as for the clusters- instead of components you name the file macros and you put the same sort of entry into it as in the components file, then you can replace a macro file. Of course there is still a entry in the components file for the gates, so i added an entry there, too- to be shure. And it works, without manipulating the map. loaded a savegame- and the gates in DeVries and Albion where replaced by the intact ones. Thanks EGO for the very good patching system! :D

But I finally have another problem- a savegame problem.
After finishing the story, heart of Albion builds a station near the gate to OL- and, of course this station is buggy. Parts are everywhere but not at the place they had to be. Having already the same problem at a planktonfarm (is plankton already english? sorry...) in DeVries- but there it is only one Credit-Docking being in the Air without being part of the station- but this is ok, I can live with that (btw, was there the whole time of building- put 50 building drones into the building ship and see what happens... :o :D )

I know that many of you had this problem- is there a way to completely replace the entry for the station in the savegame by a intact one? Can anyone give me such an intact entry?
greetings, MJ Fire

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Thu, 6. Mar 14, 23:56

hm, is there a thread for this? Otherwise, the Question:
I tried to replace the yisha bodies (head and body) by other custom ones. These meshs are original rebirth meshs but retextured, and with using the (very cheating) patch method in the game folder I sucessfully tested them. But I want to replace these meshes by using an extension (because I also want to add the Karen Stringer hood). I know that in the characters_macros there is an entry for these two meshes, but replacing by using the xml patch does not work. I think there is no other entry in another xml, so what is wrong?: This is my entry in the characters_macro:

<diff>
<replace sel='/macros/macro[@name="character_argon_yisha_macro"]/properties/models/model'>
<model type="head" selection="random">
<select index="1" ref="extensions/Pimp_My_Skunk/assets/characters/argon_bodies/ar_Liz_head" />
</model>
</replace>
<replace sel='/macros/macro[@name="character_argon_yisha_macro"]/properties/models/model'>
<model type="torso" ref="extensions/Pimp_My_Skunk/assets/characters/argon/bodies/ch_ar_f_body_Liz" />
</replace>
</diff>

for testing I added this, as you can see, to the Pimp My Skunk Mod by ICO_hr, so this isn't it. Every model is on its place. But when I start the game, yisha is still the same- also when I rename the bodys to the original yisha-file-name (of course with changing the macro entry)

PLEASE, help!
greetings, MJ Fire

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

Post by UniTrader » Fri, 7. Mar 14, 00:06

i think you forgot to select the right <model> node - if your XPath is not unique nothing will be changed.

here the right way to do it:
<diff>
<replace sel='/macros/macro[@name="character_argon_yisha_macro"]/properties/models/model[@type="head"]'>
<model type="head" selection="random">
<select index="1" ref="extensions/Pimp_My_Skunk/assets/characters/argon_bodies/ar_Liz_head" />
</model>
</replace>
<replace sel='/macros/macro[@name="character_argon_yisha_macro"]/properties/models/model[@type="torso"]'>
<model type="torso" ref="extensions/Pimp_My_Skunk/assets/characters/argon/bodies/ch_ar_f_body_Liz" />
</replace>
</diff>
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 ;)

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Fri, 7. Mar 14, 04:14

Ok, thanks, I will try.
btw, this is finally the girl in the game:

http://i.imgur.com/VzKorUk.jpg
http://i.imgur.com/qMtJfDS.jpg

greetings, MJ Fire

User avatar
Commodore MJ Fire
Posts: 476
Joined: Mon, 27. Jul 09, 17:45
x4

Post by Commodore MJ Fire » Fri, 7. Mar 14, 04:45

Ok, it WORKS, thanks! :D :thumb_up: :thumb_up: :thumb_up:
And after some issues I finally also got the transformed hood in the game in the same way- so the replacement (and adding) was fully sucessful!!!
greetings, MJ Fire

mbhm
Posts: 78
Joined: Wed, 21. Mar 07, 18:13
x4

Post by mbhm » Tue, 18. Mar 14, 23:12

With the help from the tutorial, i wanted to paint a little bit in the map.
I could create 2 Clusters at the galaxy map and i would start the game with it to use the debug mode to find errors and remove them.

But now that i try to add the sectors and zones, at some point the game crashes at start at about 30% (new gamestart no plot). The biggest part is, that there isn't even an dumpfile.

Any idea what i could do about it?

PS: Looks like it happens, when i try adding the sectors.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<macros>
	<!-- AP1 -->
  <macro name="Cluster_AP1_Sector01_macro" class="sector">
    <component ref="standardsector" />
		
		<properties>
      <identification name="{9090908,101000}" description="{9090908,101001}" />
      <area sunlight="0.8" />
      <map background="part_bg_sec_08" index="3" />
    </properties>
  </macro>
	
	<!-- AP2 -->
	<macro name="Cluster_AP2_Sector01_macro" class="sector">
    <component ref="standardsector" />
				
    <properties>
      <identification name="{9090908,201000}" description="{9090908,201001}" />
      <area sunlight="0.9" />
      <map background="part_bg_sec_08" index="3" />
    </properties>
  </macro>
  
</macros>

Code: Select all

 <macro name="Cluster_AP1_macro" class="cluster">
    <component ref="standardcluster" />
    <connections>
      <connection name="Cluster_AP1_Sector01_connection" ref="sectors">
        <offset>
          <position x="-15000000" y="10" z="-10" />
        </offset>
        <macro ref="Cluster_AP1_Sector01_macro" connection="cluster" />
      </connection>
    </connections>  
      
    <properties>
      <identification name="{9090908,100000}" />
      <sounds>
        <music ref="music_cluster_b" />
      </sounds>
      <area sunlight="0.8" />
      <map background="part_bg_albion" index="1"  shortvariation="{20007, 3001}" />
    </properties>
  </macro>

User avatar
darkelf1
Posts: 62
Joined: Sun, 26. Aug 12, 10:20

Post by darkelf1 » Sun, 23. Mar 14, 09:45

yeah, i hope really more great mod coming, like XTC before... :lol:

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Tue, 22. Apr 14, 14:45

The OSR_Universe download is no longer available from the link in the OP.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

User avatar
wysiwyg
Posts: 585
Joined: Thu, 26. Feb 04, 00:08
x4

Post by wysiwyg » Tue, 22. Apr 14, 15:18

Commodore MJ Fire wrote:No, only the link is down, changed to http://www.nexusmods.com/xrebirth/mods/28/? but Nexusmods changed their rules so nothing bigger than 2mb can be downloaded from this side. I,m NOT ready getting another new account to another side I don't know, so please reload it to complete free sides like mega.co.nz so that everyone in this forum can get it and not only the few members of Nexusmods.
greetings, MJ Fire
It's here (Thanks to CMJ) It could do with adding to the OP!

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Thu, 24. Apr 14, 06:28

Roger L.S. Griffiths wrote:The OSR_Universe download is no longer available from the link in the OP.
Sorry about that. I've been away for a while, but will fix the download link reference sometime within the next day or so.

Thanks for bringing to my attention!

Return to “X Rebirth - Scripts and Modding”