X Rebirth

X Rebirth

Entering System: X Rebirth Workshop
The new way to find, install and manage extensions for X Rebirth. Share your work with the community and see what others have created.
Learn More
S0ulstr34m 23 Jun, 2018 @ 2:16pm
Some love for X Rebirth in 2018 - Looking for help to get me started with modding
Hey everyone,

I am starting to play X Rebirth again and I feel I can bring some 'smoothness' to the game by developping some simple but gameplay enhancing mods.

I have read some of the guides like the X Rebirth modding guide (https://forum.egosoft.com/viewtopic.php?t=347831), the Mission Director Guide (https://www.egosoft.com/download/x_rebirth/files/XRMissionDirectorGuide.pdf) and others but it is still all pretty blurry to me.

I have more ideas but 2 of them that I would start by making are:
1) No collisions on highway -> Make the Albion Skunk ignore collision when on highway.

[
2) A NPC market/sector explorer -> A ship you can buy, you can only have 1, either you simply hire it or you have to build it (I would be fine with simply having to hire him -> spawn and execute his task).

This ship would travel from sector to sector and scan the area as well as getting you a TAF (trade agent forever if installed) or a regular tarde agent.

This mod would be built to consume as little processing power as possible by being idle most of the time, basically working with timers -> Order ship to move to next sector... ship get there, idles for 'x' amount of time depending on the amount of stuff to scan and sector size (to make it more realistic), then move to the next sector rinse and repeat until exploration matrix is completed -> producing a billboard message letting the player know that the exploration job is done and the NPC is retiring.

The sector exploration would be build on construction of this NPC and saved as a matrix or something like that so no calculation is ever required during the execution.

The execution time per sector would be relatively fast but not too fast as to ruin the development of your game (ie: seeing the entire market right when starting feels like no fun, i think seeing new market opportunity appearing as the game progress is fun and dynamic).
]



I have others ideas but I will start with these 2 before getting into the complicated stuff. I don't feel like these 2 mods would be hard to develop but I could be wrong.

I would appreciate any help with this, like what files do I need to look for for these kind of mods or tricks to get me quickly started. I have downloaded the X Rebirth tools and extracted the cat files and I have a bit of a programming background, just nothing like this.

Thanks guys, hoping to bring some love into X Rebirth in 2018.

Hooray to game developpers that makes their game modable :) This game came a long way lol.
< >
Showing 1-6 of 6 comments
Walker Evans 3 24 Jun, 2018 @ 9:13am 
1.

<?xml version="1.0" encoding="utf-8"?> <mdscript name="test_001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cues> <cue name="PlayerEnteredHighway_NoCollisions" instantiate="true"> <conditions> <event_object_changed_zone object="player.primaryship"/> <check_value value="event.param.isclass.highway"/> </conditions> <actions> <disable_collision_response object="player.primaryship"/> </actions> </cue> <cue name="PlayerLeftHighway_NoCollisions" instantiate="true"> <conditions> <event_object_changed_zone object="player.primaryship"/> <check_value value="not event.param.isclass.highway and event.param2.isclass.highway"/> </conditions> <actions> <clear_collision_filter object="player.primaryship"/> </actions> </cue> </cues> </mdscript>
Note: not sure if clear_collision_filter will reactivate collision response. as always, strongly suggest that you test first and save before activating the mod so you have a save to fall back on.

2. Doable, but you'd have to write an explore AI script for the ship. You could then script in any number of ways to acquire the ship or assign this AI to an already-existing ship. Simplest, for testing, would be to simply start the script on an existing ship. Maybe trigger via conversation?

Lots of tools and help available here:

https://forum.egosoft.com/viewtopic.php?t=376579

If not familiar with XML patching, theqmann's XML Patch Guide linked to in that thread can be of immense help.
S0ulstr34m 24 Jun, 2018 @ 2:04pm 
Originally posted by Walker Evans:
1.

<?xml version="1.0" encoding="utf-8"?> <mdscript name="test_001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cues> <cue name="PlayerEnteredHighway_NoCollisions" instantiate="true"> <conditions> <event_object_changed_zone object="player.primaryship"/> <check_value value="event.param.isclass.highway"/> </conditions> <actions> <disable_collision_response object="player.primaryship"/> </actions> </cue> <cue name="PlayerLeftHighway_NoCollisions" instantiate="true"> <conditions> <event_object_changed_zone object="player.primaryship"/> <check_value value="not event.param.isclass.highway and event.param2.isclass.highway"/> </conditions> <actions> <clear_collision_filter object="player.primaryship"/> </actions> </cue> </cues> </mdscript>
Note: not sure if clear_collision_filter will reactivate collision response. as always, strongly suggest that you test first and save before activating the mod so you have a save to fall back on.

2. Doable, but you'd have to write an explore AI script for the ship. You could then script in any number of ways to acquire the ship or assign this AI to an already-existing ship. Simplest, for testing, would be to simply start the script on an existing ship. Maybe trigger via conversation?

Lots of tools and help available here:

https://forum.egosoft.com/viewtopic.php?t=376579

If not familiar with XML patching, theqmann's XML Patch Guide linked to in that thread can be of immense help.



Thanks for your reply Walker and for this piece of code, it will definitively help me get started.

Would you be able to tell me where you have found the references event_object_changed_zone, disable_collision_response and clear_collision_filter?


For 2), I'm thinking of something perhaps even more simple than that. Something where all the map nodes are saved in a list with perhaps the 'size' of each sector and have a script that loops and wait a certain amount of time before registering a new sector as explored and sale contact aquired. But I will start by making 1) work first to give me a bit of practice and getting used to modding.
Last edited by S0ulstr34m; 24 Jun, 2018 @ 2:50pm
Walker Evans 3 24 Jun, 2018 @ 4:39pm 
Originally posted by S0ulstr34m:
Would you be able to tell me where you have found the references event_object_changed_zone, disable_collision_response and clear_collision_filter?
Documentation for script actions can be found in aiscripts.xsd, md.xsd, and common.xsd for actions that can be used for AI scripts, MD scripts, and both respectively. If you unpack the game files, they can be found in the libraries directory. Found those particular actions in common.xsd.

Also useful, scriptproperties.xml (also in libraries) contains documentation for all of the properties accessible via scripts. An interface is provided via scriptproperties.html, but never bothered with it myself.

The xsd files could also be used with dedicated XML editors or through programming environments such as visual studio. i vaguely remember a way to use them via Notepad++ as well, but Notepad++ ran too slow. Very vague memory though, could be mixing up my plugins.

Hope that helps. Looking forward to your work.
S0ulstr34m 24 Jun, 2018 @ 4:46pm 
Originally posted by Walker Evans:
Originally posted by S0ulstr34m:
Would you be able to tell me where you have found the references event_object_changed_zone, disable_collision_response and clear_collision_filter?
Documentation for script actions can be found in aiscripts.xsd, md.xsd, and common.xsd for actions that can be used for AI scripts, MD scripts, and both respectively. If you unpack the game files, they can be found in the libraries directory. Found those particular actions in common.xsd.

Also useful, scriptproperties.xml (also in libraries) contains documentation for all of the properties accessible via scripts. An interface is provided via scriptproperties.html, but never bothered with it myself.

The xsd files could also be used with dedicated XML editors or through programming environments such as visual studio. i vaguely remember a way to use them via Notepad++ as well, but Notepad++ ran too slow. Very vague memory though, could be mixing up my plugins.

Hope that helps. Looking forward to your work.



Many thanks again Walker, this will help me tremendously!

I have tried to use scriptproperties.html, but had no luck, it does nothing no matter what I enter in the input box.

I will try to get my first mod out and post my development here.

Thanks again :)
FunkDooBiesT 28 Jul, 2018 @ 12:55am 
Hey! Good to see some interest in X rebirth.

But I think you might be reinventing the wheel a bit here. i have at least two mods that add exploring ships that add trade updates to what they find.

The only quality of life mod I'd like is for the Skunk and the player inventory. Assign a station manager to the Skunk and then setup the trade goods buy and sell prices. If a trader hits the mark then the manager sells or buys or both. I just find it very time and energy consuming to sell those wares and normally after a while they just stack up any way.
S0ulstr34m 29 Jul, 2018 @ 4:34pm 
Originally posted by FunkDooBiesT:
Hey! Good to see some interest in X rebirth.

But I think you might be reinventing the wheel a bit here. i have at least two mods that add exploring ships that add trade updates to what they find.

The only quality of life mod I'd like is for the Skunk and the player inventory. Assign a station manager to the Skunk and then setup the trade goods buy and sell prices. If a trader hits the mark then the manager sells or buys or both. I just find it very time and energy consuming to sell those wares and normally after a while they just stack up any way.

Yes, I found 2 and tried both actually. Ended up choosing one over the other, can't remember which one.

X4 is coming so I stopped learning to mod XR. I will continue my learning on the X4 platform ;)

Sneak peak!
https://www.egosoft.com/games/x4/screenshots_en.php
Last edited by S0ulstr34m; 29 Jul, 2018 @ 4:47pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50