[MOD] Real War V 0.69 2014-04-03

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

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

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

[MOD] Real War V 0.69 2014-04-03

Post by IRaven »

[ external image ]

Deutscher Mod-Thread

Find Plutarch clashing against the Canterans and Heart of Albion on your next visit to Twilight Sentinel.

Author: IRaven


Download? Where? Right Here !

Steam Workshop:
[ external image ]

Nexus:
[ external image ]

Dropbox:
[ external image ]


This modification will change the Universe from the way you know it to a way you would expect it to be.

1.) Shipyards will from now on only produce Ships if they have at least enough Resources to build 2 Arawns. So if the Player wants to build a Ship he will not see 0% Ships that are blocking the Building Site and the Shipyard will have at least enough Resources to build 2 Arawns (if Resources keep coming. If the Player uses all Resources for Ships they will still deplete)

2.) The Shipyard will only build Ships that i can actually use.
It will build 14 new Mining Ships and 16 new Trade Ships per Faction to support the local economy.
Heart of Albion got a Set of Galaxy Wide Mining- and Trade Ships
After that is finished it will start producing Military Ships to patrol the local Sectors and fight a War in Bleek Pebble (Plutarch vs. Heart of Albion and Canterans)
If a Economy Ship gets destroyed the Shipyard will build a Replacement for it and after that continue producing Military Ships.
So never ever will the Shipyard build a ship to just vanish into thin air. Every resource you or any NPC Factory trade to the Shipyard will be either used for the local Economy, local Safety or the War.

3.) A War will break out between
Plutarch Mining Corporation
vs.
Heart of Albion, supported by Republic of Cantera
The newly builded Military Ships from the Shipyard will be used to bring Death and Destruction in an amazing and gigantic Space Battle around the Albion Jumpgate in the DeVries Cluster.
Thus making the Universe feel more like a living Entity created to entertain you.
Also the Shipyards will only produce move.die ships if it has spare resources to do so. So the winning faction will be the one with the better economy going. If you want to support the War start building stations. :)

4.) To stop Mining Ships to get killed in the War Sectors all Resources got moved from Bleak Pebble to Molten Archon and from Lookout Alpha with 50% to Ascendancy and 50% to Far out. (War Sector support for Lookout Alpha is soon to come)

5.) Also the Jump Beacon from Twilight Sentinel got moved to Crimson Rocks (as it seemed kind of silly to have War Ships just appear in front of each other)



After 24 hours:
[ external image ]

Upper Left: HOA Galaxy Economy Ships in DeVries in Action
Upper Right: The War
Lower Left + Lower Right: New Patrol Ships in DeVries-Molten Archon
[ external image ] [ external image ]

[ external image ] [ external image ]


So what does this mod do?
- Change the Relation between Factions. (Plutarch vs. HOA + RoC + Player)
- Send War Ships to Bleak Pebble and start to patrol the sector.
- Build Mining- and Trade Ships to support the local Economy.
- Only build ships that the universe actually needs.
- Set a Resource Limit to stay for the Player in every Shipyard.
- Reallocate all Resources from the War Sectors.
- Move the Jump Beacon from Twilight Sentinel to Crimson Rocks.

Save
This Mod changes the Scripts of the Shipyards. To uninstall it you will need an Uninstall Version of this Mod.
This Uninstall Version will also delete all the War- and Eco- Ships.

Nexus: Just choose the Uninstall Version from the Files.
Dropbox: Download

1.) Use this new Uninstall Script like you would Update Real War.
2.) Start and Load your Game.
3.) Follow the Instructions given In-Game.
4.) After everything is finished Save your Game, Exit X Rebirth, Delete the Mod from your Extensions Folder and Restart your Game.

Mod Compatibility
This Mod changes the Files:
aiscripts\move.die
The Trade-Managers of the 4 Big Shipyards get a new Custom aiscript running in exchange for trade.shipyard
maps\XU_ep1_universe\zones.xml [only Zones 34 + 39 and the properties from Zone 32]
libraries\region_definitions.xml


And uses Language Page ID 819091


Changelog

15.01.2014
0.40 Initial Alpha / Work in Progress Release

22.01.2014
0.41 Introduced Check for Completed Plot + Some Small Bug Fixes

25.01.2014
0.42 Some Small Bug Fixes + A little Bit here and there

27.01.2014
0.50 Beta Release / Some rearranging of Code and finally sorting out the CTD Bug

28.01.2014
0.51 Hotfix so move.die ships actually shoot something

29.01.2014
0.52 Hotfix of Hotfix, move.die ships actually really shoot something now. Tested and proved

31.01.2014
0.53 Sorting out some Bugs that would prevent the Mod to work normal if updating by just overwriting old mod-files

16.02.2014
0.60
- Update Problem solved
- Change of Ship Production
- Add Mining- and Trade Ships to support the local economy
- War Ships get a small squad of fighters for support
- Jump Beacon moved from Twilight Sentinel to Crimson Rocks
- Resources moved from Bleak Pebble and Lookout Alpha (see above)
- War Relations will only get set once on first Completing the Plot (not with every new update as was before)
- Stopped a Bug that would make a new ship move until a certain point of the zone and only then start the move.patrol script
- War Ships will patrol the whole Sector from now on
- Fuel Station in Gemstone Manufacture gets its owner changed to HoA for HoA ships to provide with fuel
- Gemstone Manufacture changes its owner to Heart of Albion

23.02.2014
0.63
- NEW FEATURE - Shipyards will only build Ships if they have spare resources so there will always be enough Resources for the Player to build
- Fixed a Bug that would cause a Crash if a Patrol Ship gets build to patrol the Shipyard Sector
- Fixed a Bug that would make Shipyards not use the new trade.shipyard script
- Fixed a Bug that would make the Modification not work with Jonferson Shipyard in Omicron Lyrae
- Fixed a Bug that would cause Patrol Ships not spawning any Defence Fighters

01.03.2014
0.65
- NEW FEATURE - HOA got 14 new Mining- and 16 new Trade Ships which will also Trade between Clusters
- NEW FEATURE - Added Patrol Ships for Sector Defence for RoC and PMC
- Added a little Pause if completing the Plot or starting a new Plot Game so the Intro or Outro Video wont disturb Mod Notifications
- Fixed a Bug that would cause Defence Fighters of Patrol Ships not doing anything at all
- Fixed a Bug that would make Shiptraders stop in the middle of producing Ships
- Fixed a Bug that would make the Mod not correctly register if the Plot isnt completed at all

01.03.2014 - Evening
0.66 Hotfix
- Fixed a Bug that would cause the Shiptrader not to restart its Scripts if updating the Mod
- Fixed a Bug that might have caused a Crash if buying a Ship
- Fixed a Bug that caused a Crash if HOA Shipyard trys to build its second Hydrogen Miner
- Fixed a Bug that might have caused the Shiptrader Script not to move on
- Fixed a Bug that might have caused a Debug-Log Error if updating the Mod (nothing Game Breaking)

06.03.2014
0.68
- NEW FEATURE - The Cell Recharge Fab in Gemstone Manufacture will get its owner changed to Heart of Albion even if you havent completed the Plot yet
- NEW FEATURE - The new Ship-Trader-Scripts will now activate even if you havent completed the Plot yet
- Reduced Fighter-Escort Squads to 1/3 of the old value to improve Performance
- Reduced War- and Patrol- Ships to a fixed number to improve Performance
- Some behind the Scene Changes to support the new War-Mission, soon-to-come
- Fixed a Bug that would cause Free-Play-Game-Starts not to register that there is no Plot in certain Cases
- Fixed a Bug that might have caused a Shiptrader to block Production if too low on Resources

03.04.2014
0.69
- Added support for new Beta 1.30 RC3 (changed Escort and Mining scripts to use the new ones)
- Escort Fighters will now spawn from Station-Docks (where the Escortee got build) and will even follow him using Super-Highways and (hopefully) Jumpgates
- Added Workshop support
(only if u are using Beta 1.30, if not please Download from Dropbox or Nexus, the new update _should_ work even when still running the old version)
If you are going to use Workshop and are updating from a older version please delete the old RealWar Folder from your \extensions\ directory as i had to change the Mod-Folder-Name for the new Workshop to "realwar".
Be aware that you _will_ have to edit your savegame then, because the Mod-Id will also get changed.
Last edited by IRaven on Thu, 3. Apr 14, 01:19, edited 60 times in total.
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

How to Install
1. Just download the file from the Nexus Page
2. Use WinRar or another Program with same features to extract the file into your XRebirth\extensions folder.
3. Start the game and follow the instructions

How to Update
1. Just download the file from the Nexus Page
2. Use WinRar or another Program with same features to extract the file into your XRebirth\extensions folder.
3. Overwrite all Files in the extensions Real War folder with the new ones.
3. Start the game and follow the instructions.

ToDo
- Make the actual War Zone changeable. (So you could move the War Zone by "winning" closer to the enemy or even start taking over Albion Sectors)
- Maybe have different "War Zones" for the different Factions, like Argon Government vs. Xenon (After giving Xenon a real working Economy and Shipyard)

Credits
My Credits go to:
EgoSoft for releasing this great game.
All the Modders in this forum (in special Mad_Joker whose modifaction UFO helped to teach me alot about XRebirth's xml patch method. Thank you for all those <!-- comments -->)
Venetian for uploading his X Rebirth Cat Reader, that helped me to take a look at the original Egosoft files as a method of learning and getting bits and bytes of code to get my modification working.
Night Nord for helping me out with the problem of how ship production is managed.
BlackRain for Bugtesting my Beta Patches and being a great help at discovering Bugs.



This is my very first mod for any X Game yet (i started from X3 Terran Conflict and there never was a need for me to make any modifications as there were already that many on the market. Well things changed for X Rebirth)
Please go easy on me. :)
Last edited by IRaven on Sat, 1. Mar 14, 00:14, edited 12 times in total.
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Good evening ladies and gentlemen,

so after this really long brackets of text - here goes my first question.

I would like to integrate a check into this modification if the plot is already finished.
It would seem kind of wirry if the Argon Government
Spoiler
Show
goes attacking Plutarch while still having a Xenon Invasion next door.
I tried my luck with:

Code: Select all

		<!-- Check for if Plot already ended -->
		<cue name="CheckPlotEnd" instantiate="false" namespace="this">
			<conditions>
				<check_all>
					<event_cue_signalled />
					<event_cue_completed cue="md.Setup.PostChapter3Jobs" />
				</check_all>
			</conditions>
			<actions>
				<set_value name="DefineWarZoneFirst.$PlotComplete" exact="1" />
			</actions>
		</cue>
Its the very last cue in the md script. But the ingame Debug Log tells me that the condition isnt allowed in this kind of context :'(

If anyone has any idea how one could do this it would be really appreciated.

Thank you in advance :)



Edit: Solved
Last edited by IRaven on Wed, 22. Jan 14, 01:13, edited 2 times in total.
Thurmonator
Posts: 205
Joined: Thu, 4. Dec 03, 21:07
x2

Post by Thurmonator »

NIce idea

Have you seen any amazing battles yet?
User avatar
Fumblesneeze
Posts: 75
Joined: Tue, 26. Nov 13, 10:07
x3tc

Post by Fumblesneeze »

I like this idea.
Streaming while writing mods: twitch.tv/fumblesneeze
toepick
Posts: 103
Joined: Wed, 29. Feb 12, 16:57
x4

Post by toepick »

I don't like that random ships are built just to send off to be destroyed; I can understand the need for sinks, but if there were enough raids or a war that successfully destroyed things (npc ships/stations in particular) there wouldn't be a need for this sink.

It seems that this sink makes ships like mad, which I don't have a problem with.. its the fact that each of these ships takes a ton of drones and keeps the shipyards out of construction/cargo lifters as the game gets longer.

I take it that you have found a way to manipulate this ship building system (and I like the whole war idea.. or at least making them do something interesting lol). Have you been able to control the building rate, or even how many drones these ships decide to equip themselves with?

I'm wondering if you had this constant 'war' going on between a couple of the major factions, and just those losses were replaced if that would still provide the 'sink' without depleting so many resources (drones esp) so fast.

Thanks!! Nice mod :)
Deleted User

Post by Deleted User »

great idea!
vadiolive
Posts: 337
Joined: Wed, 18. Dec 13, 04:36
x4

Post by vadiolive »

I like this but this mod make my game crash often

1.22
Everything work fine if del this mod
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

toepick wrote:I don't like that random ships are built just to send off to be destroyed; I can understand the need for sinks, but if there were enough raids or a war that successfully destroyed things (npc ships/stations in particular) there wouldn't be a need for this sink.

It seems that this sink makes ships like mad, which I don't have a problem with.. its the fact that each of these ships takes a ton of drones and keeps the shipyards out of construction/cargo lifters as the game gets longer.

I take it that you have found a way to manipulate this ship building system (and I like the whole war idea.. or at least making them do something interesting lol). Have you been able to control the building rate, or even how many drones these ships decide to equip themselves with?

I'm wondering if you had this constant 'war' going on between a couple of the major factions, and just those losses were replaced if that would still provide the 'sink' without depleting so many resources (drones esp) so fast.

Thanks!! Nice mod :)
At the moment i havent found any way to manipulate ship building system.
I only manipulate the way this game handles ships that are "too much" in the universe.

If i could i would only let them produce military ships (as its kinda funny to see a rahanas go to war .-.)

But i like your idea and if i find a way to manipulate this i will think about a minimum resource storage just for player production ;-)
vadiolive wrote:I like this but this mod make my game crash often

1.22
Everything work fine if del this mod
Yeah i am trying to figure out what the problem is.

As soon as a ship gets constructed and starts the move.die script and comes to the point, that it has finished the undocking the game crashes.

I have tried changing this and that but no success.

Somehow the first ship is working fine but the second one will kill the game.
Well i will keep trying.

Will post an update as soon as i figured this out.
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Update 25.01.2014

New Version uploaded (only Dropbox now as nexusmod is in maintenance again .-.)
Edit: Nexus File now up2date too

Version 0.42
- Some small Bug Fixes
- Adding and Removing some stuff here and there.

My actual problem of the Crash to Desktop is still present at this time.

I actually have _NO_ idea what is wrong and tried like pretty much everything.
As this is still my first modification my coding knowledge is that of a 3 year old so my skills in getting this frak to work seem to be not capable enough.

Anyway i have uploaded a Dropbox File for everyone who feels like helping me out on this.
This Dropbox File contains:
- extensions folder (All the Mods i am using including actual version of RealWar)
- savegame (my latest savegame, just dock at the shipyard and sell the first taranis to reproduce the error
- savegame (All Shipyards got a real bunch of resources added in this save for testing out the mod)
- mdmp + dmp error file (i have no means to open those in a readable state)
Edit: err nearly forgot, i am using 1.23 Beta in this savegame

Link: https://www.dropbox.com/s/84uo2t8jt55oun1/ThankYou.rar (1.58 MB)

My best Bet on what is causing the problem is
aiscripts\move.die

Code: Select all

<signal_objects object="player.primaryship" param="'mdship'" param2="this.ship" />
in combination with
md\RealWar

Code: Select all

<event_object_signalled object="player.primaryship" param="'mdship'" />
But as stated above i dont know of any other way to adress a md.cue + giving the this.ship information for testing out if that's really the problem.
(The game works fine if i delete this cue:

Code: Select all

<cue name="MoveOrder" namespace="this">
)

The InGame Debug Log doesnt give out any errors so normaly one would expect this mod to work.

If anyone has any ideas what else i could test or even provide a working file i would be most thankfull.
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Update 27.01.2014

New Version uploaded

Version 0.50
- Some small Bug Fixes
- Adding and Removing some stuff here and there.
- Some rearranging of Code
- FINALLY sorting out the Crash to Desktop Bug

This Mod is running without any crashes now (i am running it in windowed mode right now to get you some screenshots of the "War")

For those who actually care what the problem was:
After just changing stuff to get it working i started to find out what the real problem was.
As i did write already deleting the cue Move Order did stop the bug i started adding one bit of that cue everytime and restart the game. In the very end i found out that the problem was the <start_script> stuff.
Deleting that line and it worked fine.
After trying this and that again i had one final solution. If that didnt worked i would have given up xD
putting that <start_script> into a new cue and replacing it in the MoveOrder with a <signal_cue>
And it frakking worked (and is still working) ._.

As <event_object_signalled> was started by an aiscript the game kind of didnt like the idea of starting an aiscript with that again.
This would be like
aiscript starts mdscript which starts aiscript
So the game thought "you know what... go and eat my shorts"
Well its working now, so no further questions asked.
Next i will take a look at reallocating resources for keeping the DeVries Economy going. This will probably overwrite other mods partly like "No Stardust" or "Gushing Spring Make Over". As all those are using the region_definitions.
Sorry for that in advance.
Last edited by IRaven on Wed, 29. Jan 14, 00:38, edited 1 time in total.
savagetwinky
Posts: 169
Joined: Tue, 11. May 10, 19:29

Post by savagetwinky »

hmmm... would it be at all possible to modify this and... convert all the ships to pirate owned and attack the player? turn the game into survival mode!
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

savagetwinky wrote:hmmm... would it be at all possible to modify this and... convert all the ships to pirate owned and attack the player? turn the game into survival mode!
sure ^^

just go ahead, u can use my files to your hearts content :)

After 1 hour:
[ external image ]
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Update 28.01.2014

HotFix uploaded

Version 0.51
- Rearranging move.die ships defence officers to actually shoot something
- Introducing check for right faction, so ships from generic missions wont fly there too
- Giving lots of <!-- Notes --> in the md.script for everyone who want to use my files as a means of learning something about modding this great game.

After having a little test i found out the move.die ships didnt shoot frak. I could even shoot plutarch ships and they would not open fire on me.

Workaround:
The Mod deletes the whole crew now and creates a new one with the right scripts set on each Crew Officer.
On a sidenote, i havent seen any Argon Government ships yet. As this mod forces the ships to buy some jump fuel before flying to the warzone (so the universe gets a little bit more action of ships passing thru) they are probably in a waiting queue for buying fuel cells (i did read the omicron cell recharge fabs have a problem of aquiring bofu) will take a look at this some other day


Edit:
or not .-.

either the move.patrol script is not working right (ships i did sell will attack the Plutarch Overwatch and shoot every enemy in range but other ships build by the shipyard get Order "none" and wont attack anything nor shoot back at all if you attack them. They just fly around the zone)

Or ships created by the shipyard are frakked up. Its not a matter of the crew at least. Found an order <create_ai_unit> will try that this evening.

Edit 2:
<create_ai_unit> did the trick, will run a small test and upload a hotfix.
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Update 29.01.2014

HotFix of HotFix uploaded

Version 0.52
- move.die ships really shoot something now, Tested and proved.
- Tried to delete Plutarch Overwatch without success, so nothing else yet
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Would it be impossible for these battles to somehow influence buildspot ownerships (take over existing spots, and take new ones)?
Guess im dreaming.. :)
losthart2611
Posts: 22
Joined: Fri, 27. Dec 13, 01:04

Post by losthart2611 »

Do npc actually build new stations?
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

pref wrote:Would it be impossible for these battles to somehow influence buildspot ownerships (take over existing spots, and take new ones)?
Guess im dreaming.. :)
i dont really get your question.
It would be kind of easy to take over an enemy station. you would just need
<find_station name="$station" *extra stuff to find the right station* />
and
<set_owner object="$station" owner="faction.whateveruwant" />
<set_owner object="$station.manager" owner="faction.whateveruwant" />
<set_owner object="$station.defencenpc" owner="faction.whateveruwant" />
<set_owner object="$station.engineer" owner="faction.whateveruwant" />

what would be much harder is to simulate a "boarding" of said station. but i am interested into this approach too. Of course only if player is present.


But for the beginning i would just like to find a way to destroy the Plutarch Overwatch station for good. ^.^

losthart2611 wrote:Do npc actually build new stations?
Not yet.

But there gets 2 (or so?) staple farmeries build in the plot. (What is actually a bug / I think there were two people coding separate parts of the plot and both wanted to add a station to that sector in the same spot. So both did in the end. One for RoC and one for HoA)
Last edited by IRaven on Wed, 29. Jan 14, 23:42, edited 1 time in total.
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

actualy npcs are seposed to build stations I think , sins there are npc build spots
IRaven
Posts: 254
Joined: Wed, 21. Mar 12, 19:49
x4

Post by IRaven »

Update 31.01.2014


Version 0.53
- Sorting out some Bugs that would prevent the Mod to work normal if updating by just overwriting old mod-files


You can now just overwrite your old game Files with the new Update. (No need to delete the mod from your save anymore for it to work properly)
[I was always testing with a fresh savefile (the one i provided above) So i first realized this fatal flaw when lying in bed trying to get some sleep xD]

New on To-Do:
Thinking about splitting move.die Ships between military and trade and mining ships. Military Ships will go to War, Trade ships will get some Auto-Trade aiscript, (but only a maximum of x per cluster) others will use the regular move.die script until i find out how to influence ship building by npc's.
(And Mining ships will of course get a auto mining aiscript running making it sell the raw materials to best paying station per cluster after mining a full hold)

Return to “X Rebirth - Scripts and Modding”