[TUTORIAL] X Rebirth - Modding Guide

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

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

Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

macros.xml

Post by Realspace »

Observe...be patient with me...all this xml root is so confusing... :roll:
if I see correcty by your mod, the files inside INDEX MACROS.XML and COMPONENTS.XML DON'T need the patch method? I want to chenge the reference to these objects so to use my booster, here it is

Code: Select all

<index>
	<!-- <entry name="*" value="assets\entry"/>-->

	<entry name="highway*" value="extensions\RS_NoLanes\maps\XU_ep1_universe\zonehighways"/>

	<entry name="enginebooster_player_01_macro" value="extensions\RS_NoLanes\assets\props\EngineSystems\macros\enginebooster_player_01_macro"/>

	<entry name="radar_ship_s_player_01_macro" value="extensions\RS_stars\assets\props\surfaceelements\macros\radar_ship_s_player_01_macro"/>

</index>
Already tested, it works if a put the full macros.xml in my mod and change only these 3, can I simply add a macros.xml in my mod containing ONLY the 3 entries I need?[/b]
felrasha
Posts: 37
Joined: Mon, 18. Nov 13, 14:55

Post by felrasha »

How do I enable and see debug-logging in this game?
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Re: macros.xml

Post by Observe »

Realspace wrote:...can I simply add a macros.xml in my mod containing ONLY the 3 entries I need?[/b]
If you want to add new unique entries in the root node, you can do as you suggest - include macros.xml in your mod containing only the 3 new entries. This will effectively merge your new entry with the existing file; with your items being at the end of the list (in memory).

However, if you are changing some existing entry, or adding something to a sub-node, you must use the patch method. I know this can be very confusing. The best thing is to do what you are doing - experiment as you wrap your head around it. :)
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

@Realspace: Considering you are removing the local highways, one thing you may want to do is include some MD code to reveal zones at long distance so you can better navigate. I can help you with that if you decide to go that way.
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Post by Realspace »

Observe wrote:@Realspace: Considering you are removing the local highways, one thing you may want to do is include some MD code to reveal zones at long distance so you can better navigate. I can help you with that if you decide to go that way.
That would be great! Yes I'm going in that direction and I changed the booster so you can use it to move around at high speed, increased the radar range...well, you can see the mod http://forum.egosoft.com/viewtopic.php?t=350673

Now the issues are
1) Will ALL the ships use the booster to travel once you remove the highways? Capitalships and bigger freighters already do it regarderless so removing the lanes has no effect for them, I checked the engine_booster macros and the NPC ships use a booster that has not the limitations of player's booster (which I removed anyway with the mod).
2) How can player find locations (Radar already augmented)? Your solution seems better

About the macros, as in the code I wrote, those entries are PATCH becouse they already exist only I make them direct to my mod. It is working though, but a patch method would be better. Wolud you please write a string for one entry? I can't do it if it is not one of the example of your tutorial, don't know what to do.
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

@Realspace: I will answer your questions and provide code example as soon as I have time to fit it in. I only mention in case you think I am ignoring you. :wink:
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Post by Realspace »

absolutely! Whenever you have time :wink:
Symplexity
Posts: 7
Joined: Wed, 27. Dec 06, 14:08

Post by Symplexity »

Great guide! I do hope more capable people(than me) get on this and make some new systems(hopefully some nice dangerous systems!)

Looking forward to see all the amazing mods people will make!
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Symplexity wrote:Great guide! I do hope more capable people(than me) get on this and make some new systems(hopefully some nice dangerous systems!)

Looking forward to see all the amazing mods people will make!
well, this tuto was basically for all xml related stugg, which is about 75% of the whole Game.. i think you can do some basic remodelling with that, messing around in the Main Menu, MDing, AIscripting, writing cutscenes, change/add text to the game and much more stuff... only things missing are the necesary stuff for the UI lua files and the stuff for the 3d models, then i think we can do pretty much everything...
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 ;)
immakingfx
Posts: 1
Joined: Tue, 19. Nov 13, 05:46
x4

Post by immakingfx »

And where can i find FX particles and other settings, how сan I edit them?
Thanx.. )
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

shaders?

Post by Realspace »

What do u think, mybe shaders are somehow bad or what? The game looks good after I decreased the gamma and reduce color saturation (on monitor) but something such as this planet is really ugly. How can we adress this?

http://static1.nexusmods.com/154/mods/1 ... 867250.jpg
Raider480
Posts: 196
Joined: Fri, 30. Jul 10, 05:32
x4

Post by Raider480 »

@r4m0n
Just curious, why did you go with C# for that cat/dat unpacker? 52 lines would probably be easy enough to port to C++. That would allow it to work on OS X and Linux much more easily, once XR comes out for those platforms as well.
User avatar
r4m0n
Posts: 12
Joined: Thu, 15. Dec 11, 18:48
x3tc

Post by r4m0n »

Raider480 wrote:@r4m0n
Just curious, why did you go with C# for that cat/dat unpacker? 52 lines would probably be easy enough to port to C++. That would allow it to work on OS X and Linux much more easily, once XR comes out for those platforms as well.
I went with C# because I knew it would only take a few moments to make it there, and it was just a quick hack anyway, the sharing is a bonus :-)
It should run fine with Mono on OSX and Linux without changes, which is probably more than would happen if I had written it in C++.
If there is any real need of a native CAT reader/writer, I may write one later, but there seems to be quite a few around already (most C#/python by the looks, though).
TargetLost
Posts: 474
Joined: Wed, 23. Nov 05, 20:27
x3tc

Re: shaders?

Post by TargetLost »

Realspace wrote:What do u think, mybe shaders are somehow bad or what? The game looks good after I decreased the gamma and reduce color saturation (on monitor) but something such as this planet is really ugly. How can we adress this?

http://static1.nexusmods.com/154/mods/1 ... 867250.jpg

I think that something is indeed wired with the shaders that eat's up the quality of detailed textures and also alternates the colors into unhealthy saturations.


I already posted this once in a thread but it died in the big flood of threads:
Here the picture again:

http://abload.de/img/yishabadandgoodgndcd.jpg

After my yishas suit test mod I started playing the game (new game) and took some pictures of her. It's all the same model no more changes done!!! Original I planed to completly mod her including the mesh give her a human aperance so I wanted to have them as comperation.

Not only it's extremly light depending and most time overlightened there is also a quality difference between the suit and the face.

They use different shaders for face and body but the face one clearly erases details. If you open and check the face texture it isn't that low quality like it then apears in the game.

I don't know if tweaking the shader settings in the xml file will help here..
its something that could be tried could be interesting.
but maybe it's a general shader engine thing.. (something to do with xbox360 shader limits maybe.. dunno just guessing after all this console talks)

p.s. forgot: I used C# too for mine. Once you learned to know C# you don't want to program in C++ anymore if it doesn't really have to be. It's quite a difference.
Sir Warwick
Posts: 366
Joined: Sat, 7. Feb 04, 18:27
x4

Post by Sir Warwick »

Gazz wrote:For the last day I've been trying to fix one little thing... removal of the "dead" cockpit graphics... but without any success.
I never worked with 3D graphics before so it's like trying to disarm a nuclear device where all the buttons are labeled in cyrillic letters.

It's not the biggest issue with the game (that would be the UI (or lack of one)) but it sounded like something I could do to make the main screen not look so horribly cramped.
You may find its not worth doing as I think the view port of the outside view is actually smaller than the screen size (ie perhaps the rectangle of the main window of the cockpit). Ive notice some thjing getting visually discards when only in the little transparent bit at the top of the screen - ie more or less as soon as they are out of the cockpit main window.
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Re: shaders?

Post by Realspace »

TargetLost wrote:
Realspace wrote:What do u think, mybe shaders are somehow bad or what? The game looks good after I decreased the gamma and reduce color saturation (on monitor) but something such as this planet is really ugly. How can we adress this?

http://static1.nexusmods.com/154/mods/1 ... 867250.jpg

I think that something is indeed wired with the shaders that eat's up the quality of detailed textures and also alternates the colors into unhealthy saturations.


I already posted this once in a thread but it died in the big flood of threads:
Here the picture again:

http://abload.de/img/yishabadandgoodgndcd.jpg

After my yishas suit test mod I started playing the game (new game) and took some pictures of her. It's all the same model no more changes done!!! Original I planed to completly mod her including the mesh give her a human aperance so I wanted to have them as comperation.

Not only it's extremly light depending and most time overlightened there is also a quality difference between the suit and the face.

They use different shaders for face and body but the face one clearly erases details. If you open and check the face texture it isn't that low quality like it then apears in the game.

I don't know if tweaking the shader settings in the xml file will help here..
its something that could be tried could be interesting.
but maybe it's a general shader engine thing.. (something to do with xbox360 shader limits maybe.. dunno just guessing after all this console talks)

p.s. forgot: I used C# too for mine. Once you learned to know C# you don't want to program in C++ anymore if it doesn't really have to be. It's quite a difference.
ALERT!! I had an ISSUE with ATI so many textures appared very LOW even if settings was high! Check if you have ATI in the catalyst and set everything to default. Backgrounds, planets, HUD and the interiors were terrible before
Ska-Ara|Sl-A
Posts: 588
Joined: Fri, 25. Jul 08, 20:46
x4

Post by Ska-Ara|Sl-A »

so a question from the german part of the community :D

i was trying to make new faces for the old womans in the game...
i made a folder , set the assets folder and so on and set my new texture in it with the name of the Original one ( so the game has to take my texture then the one in the game files) but nothing happens ingame.

i made this test mod http://www66.zippyshare.com/v/40238856/file.html with all the specifics of my mod. so could anyone tell why there are not shown ingame?
User avatar
Observe
Posts: 5323
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe »

How is this thread being updated?
stones1601
Posts: 11
Joined: Tue, 19. Apr 11, 04:57

Post by stones1601 »

Edit: Finally figured it out and then found the realistic highways mod does exactly what i wanted to do and a hell of a lot neater :)



Original Post:
Hey guys, I've been trying to get my head around Xml patching (sorry if I missed some obvious guide) and have a question or two. In the highwayconfiguration.xml under highwayconfigurations/tubeconfigurations there is this section

Code: Select all

 <tubeconfiguration id="local_hw_tube_config_a" material="effects.highway_tube" macroname="props_he_local_highway_stream_macro" adsignmacroname="props_he_local_highway_sign_holder_macro" lanewidth="75">
      <scaling maxplayerspeedscale="2" maxhighwayspeedscale="4" />
      <fading fadeinfraction="0.08" fadeoutfraction="0.05" />
      <edge edgestartfraction="0.5" edgecollisioneffect="super_hw_edge_collision_effect" edgecollisioneffectdelay="0.5" maxedgedeceleration="2000.0" breakoutspeed="0.5" />
      <outsideforce linear="100" angular="0.25" range="4" />
      <acceleration base="0.01" />
      <boost duration="5" value="1" />
      <part partname="anim_repeater" fadestart="0" fadeend="0" speed="30" speed_var="0.0" /> 
I simply want to change <boost duration="5" value="1" /> to a different number and i'm unsure if i can simply replace the one line?, or do i need to include the entire section?


Now for my bit of code. can anyone point out if i'm getting the "<replace sel="...">" line right. i've been cracking open other peoples mods to try and get a idea but i can't find anyone that's made a change enough like this one to get a good idea of how to do it.

Code: Select all

 <diff>
   <replace sel="/highwayconfigurations/tubeconfigurations/[@id='local_hw_tube_config_a']">
   <boost duration="500" value="1" />
  </replace>
    </diff> 
Any help or a point in the right direction would be much appreciated. Cheers guys
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Ska-Ara|Sl-A wrote:so a question from the german part of the community :D

i was trying to make new faces for the old womans in the game...
i made a folder , set the assets folder and so on and set my new texture in it with the name of the Original one ( so the game has to take my texture then the one in the game files) but nothing happens ingame.

i made this test mod http://www66.zippyshare.com/v/40238856/file.html with all the specifics of my mod. so could anyone tell why there are not shown ingame?
got a solution for that i think: XRebirth still prefers to use files inside Cats/Dats instead of raw files, except you give it a parameter which tells XR to prefer extracted files. i think for modding this should be default behavior for files which cannt be modified like the xmls. Observe told the parameter 1 to 3 pages ago, nor sure what it was exactly and no time to look currently..
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 ;)

Return to “X Rebirth - Scripts and Modding”