[MOD] X:R Conquer mod v0.19s Updated 29/09/2015

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

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

User avatar
Informer
Posts: 283
Joined: Wed, 3. Jul 13, 23:10
x4

Post by Informer »

Very nice. Will update this new version tonight.

One question, Do I need uninstall the "better turrets mod" or is your mod just changing the Cicero1111 mod?

Thanks for the update, much appreciated. :D
Information is power. But like all power, there are those who want to keep it for themselves (Aaron Swartz you will live forever)
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Rubini wrote:First post updated with new version v016s. Here its final changelog:
FINAL changelog! It's done! Congrats!
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Informer wrote:Very nice. Will update this new version tonight.

One question, Do I need uninstall the "better turrets mod" or is your mod just changing the Cicero1111 mod?

Thanks for the update, much appreciated. :D
Yes, as Better Turrets is now integrated on CM, is better do uninstall its solo version to run Conquer mod from v016s and above.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

w.evans wrote:
Rubini wrote:First post updated with new version v016s. Here its final changelog:
FINAL changelog! It's done! Congrats!
Hi w.evans,
How are you, mate?

Well, last changelog for v016s. :P
Probably more one or two updates will be yet needed to better balance the mod and perhaps some new features too. But it is already very fun&challenge to play with.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Good to hear that you're making progress!

Unfortunately, I've been very busy with work, and haven't had any time to play since around April. (Except for some puttering around with Kerbal SP and Kenshi, which are fun, but don't demand as much time as X:R). I'm very sorry that I haven't been able to contribute anything useful, but simply haven't had any time. I am working on updating SMUPS to the linux beta, though, following a helpful report by CulunTse that it wasn't working on linux, and possibly, why. A bit tricky since I couldn't test it myself since I don't have a linux box, but the fix seems to be a simple one. (If it works!)
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

started new game and got about 5 zones with strongholds in empty space of Glaring Truth. Is it normal behavior?
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

DaveDee wrote:started new game and got about 5 zones with strongholds in empty space of Glaring Truth. Is it normal behavior?
No, its not be this way. Can you send me your save and post more details?
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

Here you go

But i have quite huge amount of other mods. Maybe i should try without them too.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

@Davedee,

Just arrived from my work. Looked at the files and found this:

Code: Select all

<do_if value="$zones.{$i}.name != 'Empty Space' and $zones.{$i}.name != 'Unknown Zone'and player.primaryship.zone != $zones.{$i}" > 
Note that exactly where it check for Unknown Zones we have a typo: no space between "Zone'" and "and". Probably this is the culprite, a last minute accidental bug because in my files its not present. I will upload a hotfix in few minutes but you find this typo in this file "Conquer_mod.xml". Correct it by yourself and test it if you want. :wink:
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

@Rubini

Nope... empty zones keep spawning after about 15 minutes of game.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Ok. Lets try to solve it then. Let me know if i understood you well:
- You have Outposts (strongholds) being create in Empty or Unknown zones.
Is this?

- If so, this is not as it must be. Below is the entire Build Stronghold routine. Note that it have a lot of checks and one (the above post showed) that is specifically to not have strongholds on these empty areas:

Code: Select all

<cue name="Build_StrongHold_cue" checktime="15s" checkinterval="30s" version="1">
  	<conditions>
		<cue_is_complete cue="md.Setup.Start"/>
 		<check_value value="md.CM_Config.Settings.$Check == 1" />
   	</conditions>
	<delay min="90s" max="150s"/>
   	<actions>
   <!-- conditions for military presence: unique owner of military l or xl in a zone, no enemy stations or stronghold present, zone ownership must be enemy, own or null -->
		<create_list name="$Owners"/>
		<find_zone name="$zones" space="player.galaxy" multiple="true" >
			<match class="class.highway" negate="true"/>
 		</find_zone>
		<do_all exact="$zones.count" counter="$i">
		  <do_if value="$zones.{$i}.name != 'Empty Space' and $zones.{$i}.name != 'Unknown Zone'and player.primaryship.zone != $zones.{$i}" >
		  <!--<do_if value="$zones.{$i}.name != 'Empty Space' and player.primaryship.zone != $zones.{$i}" >-->
			<find_ship name="$zoneShips" class="[class.ship_l, class.ship_xl]" functional="true" space="$zones.{$i}" multiple="true">
				<match_any>
 					<match primarypurpose="objectpurpose.fight"/>
                    <match macro="macro.units_size_xl_cargo_hauler_2_macro"/>
				</match_any>
			</find_ship>
			 <do_if value="@$zoneShips.count" >
				<do_all exact="$zoneShips.count" counter="$j">				
					<set_value name="$zs_owner" exact="$zoneShips.{$j}.owner" />
<!-- short version player -->				
					<do_if value="$zs_owner == faction.player" >
						<set_value name="$zs_owner" exact="faction.canteran" />
					</do_if>
					<!--<do_if value="not $Owners.indexof.{$zs_owner} and $zs_owner != faction.player">-->
					<do_if value="not $Owners.indexof.{$zs_owner}">
<!-- short version player -->	
					    <append_to_list name="$Owners" exact="$zs_owner" />
          			</do_if>
				</do_all>
			 	<do_if value="$Owners.count == 1 and md.Conquer_Mod.Start.$Main_Factions.indexof.{$Owners.{1}} and $Owners.{1} != faction.xenon" chance="md.CM_Config.Settings.$StgRFChance" >
				<find_station name="$Stations" space="$zones.{$i}" multiple="true"/>
				<set_value name="$Flag1" exact="1" />
				
				<do_if value="@$Stations.count gt 0" >
					<do_all exact="$Stations.count" counter="$k">				
						<do_if value="$Stations.{$k}.owner.hasrelation.enemy.{$Owners.{1}} or $Stations.{$k}.macro == macro.struct_bt_alb_warehouse_macro">
							<set_value name="$Flag1" exact="0" />
						</do_if>
					</do_all>
				</do_if>
				
				<do_if value="$Flag1 and player.primaryship.zone != $zones.{$i} and (@$zones.{$i}.owner.hasrelation.enemy.{$Owners.{1}} or $zones.{$i}.owner == $Owners.{1} or $zones.{$i}.owner == null)" >

   <!-- CREATE STRONGHOLD -->
				<create_station name="$StrongHold" macro="macro.struct_bt_alb_warehouse_macro" zone="$zones.{$i}" owner="$Owners.{1}">
                  	<safepos y="-5km"/>
              		<buildsequence sequence="'a'" stage="1"/>
              		<buildsequence sequence="'f'" stage="3"/>
                </create_station>
				<create_cue_actor name="$defencemanager" cue="this">
              		<select faction="$Owners.{1}" tags="tag.defencecontrol"/>
              		<owner exact="$Owners.{1}" />
            	</create_cue_actor>
            	<set_entity_type entity="$defencemanager" type="entitytype.defencecontrol" />
            	<assign_defence_manager object="$StrongHold" actor="$defencemanager"/>
            	<start_script object="$defencemanager" name="'fight.attack.object.station'" />
   <!-- create minefield in a Safe position around the Stronghold -->
				<do_all min="md.CM_Config.Settings.$MineMin" max="md.CM_Config.Settings.$MineMax">
					<set_value name="$Yw" min="1deg" max="360deg"/>
					<set_value name="$Pt" min="1deg" max="360deg"/>
					<set_value name="$Rl" min="1deg" max="360deg"/>		
          			<create_object groupname="$Mines" zone="$zones.{$i}" macro="macro.props_wps_mine_02_macro" owner="$Owners.{1}">
						<safepos object="$StrongHold" min="3000m" max="6500m" radius="600m"/>
						<rotation yaw="$Yw" pitch="$Pt" roll="$Rl"/>
          			</create_object>
        		</do_all>
				<do_if value="$Owners.{1} == faction.canteran" > 
					<set_known object="$StrongHold" known="true" />
				</do_if>

<do_if value="md.CM_Config.Settings.$DebugMessages or md.Conquer_Mod.Start.$Debug" > 
		<show_notification caption="'=== Conquer Mod Build_StrongHold ==='" details="' \n Stronghold built by military presence: \n Zone: %1 \n Zone owner: %2 \n Ships l xl: %3 \n Owners.count: %4 \n first Owner.list.name: %5 '.[$zones.{$i}.name, $zones.{$i}.owner, @$zoneShips.count, $Owners.count, $Owners.{1}]" timeout="10s" queued="false" priority="8" sound="notification_generic"/>
 		<write_to_logbook category="general" text="'=== Conquer Mod Build_StrongHold === \n Stronghold built by military presence: \n Zone: %1 \n Zone owner: %2 \n Ships l xl: %3 \n Owners.count: %4 \n first Owner.list.name: %5 '.[$zones.{$i}.name, $zones.{$i}.owner, @$zoneShips.count, $Owners.count, $Owners.{1}]"/>
</do_if>

				</do_if>
				</do_if>
				<remove_value name="$zoneShips"/>
				<clear_list list="$Owners"/>
			</do_if>
		  </do_if>
		</do_all>

		<reset_cue cue="Build_StrongHold_cue"/>
	</actions>
   </cue>
This is the unique cue on the mod that creates strongholds. Hummm...
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

- You have Outposts (strongholds) being create in Empty or Unknown zones.
Is this?
Yup, 3 outposts atm in Glaring Truth. Dunno how much in other sectors.
Is it possible, that boosting trade ships are causing this? I have no other idea.

If you really need it, i can test it without other mods.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

DaveDee wrote:
- You have Outposts (strongholds) being create in Empty or Unknown zones.
Is this?
Yup, 3 outposts atm in Glaring Truth. Dunno how much in other sectors.
Is it possible, that boosting trade ships are causing this? I have no other idea.

If you really need it, i can test it without other mods.
Well, i played the game almost the end with Conquer Mod last 30 days and didn't saw this behaviour. Obviously a lot of my capships (trade or military ones) also boost here and there. And, as this mod is huge in terms of how much areas of the game it works, isn´t possible to just "one man" test all possible situations, so errors could pass without notice on my end. We must concentrate on the above code as it is the unique place where the stronghold can be built. You saw there a explicit line code that is exactly to not build anything in empty zones. Unless empty zones have others names that not those 2: "Empty Space" or "Unknown Zone". I made this routine 2 months ago and have looked deep on X:R files looking this issue and zone names. Do you had or noticed this behaviour in others CM versions?
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

@DaveDee, any news?
At my end I´m trying to reproduce the problem and also checking the code. Found nothing until now. Can you send me your save game?

Edit: here the name of all zones in X:R and the unknown:
<page id="20005" title="Zones" descr="Zone names and descriptions" voice="yes">
<t id="1">Wrecksville</t>
<t id="2">Azure Barrier</t>
<t id="3">Smokestack</t>
<t id="4">Straining Coppice</t>
<t id="5">Auspicious Excavation</t>
<t id="6">Dwarfish Tinderbox</t>
<t id="7">Distant Fume</t>
<t id="8">Dormant Bear</t>
<t id="9">Even Temper</t>
<t id="10">Epsilon Lowlands</t>
<t id="11">Watergate</t>
<t id="12">Frozen Circuit</t>
<t id="13">Cuspid Splint</t>
<t id="14">Distress Reek</t>
<t id="15">Cold Peaks</t>
<t id="16">Crossroads</t>
<t id="17">Sinister Poem</t>
<t id="18">Periodic Blasting</t>
<t id="19">Shady Vault</t>
<t id="20">Five Ways</t>
<t id="21">Buried Treasure</t>
<t id="22">Forlorn Armoury</t>
<t id="23">Serpentine Driveway</t>
<t id="24">The Third Duke</t>
<t id="25">Liquid Metal</t>
<t id="26">Forge-Welded Mail</t>
<t id="27">The Big Empty</t>
<t id="28">Concealed Hideout</t>
<t id="29">Exhaustless Mines</t>
<t id="30">Woodland Pasture</t>
<t id="31">Steady Mole</t>
<t id="32">Gemstone Manufacture</t>
<t id="33">Rising Star</t>
<t id="34">Twilight Sentinel</t>
<t id="35">Flickering Flame</t>
<t id="36">Dim Flamelet</t>
<t id="37">Persistent Darkening</t>
<t id="38">Sparse Warmth</t>
<t id="39">Crimson Rocks</t>
<t id="40">Fell Affliction</t>
<t id="41">Heartache Mist</t>
<t id="42">Sanguine Agony</t>
<t id="43">Torrid Veil</t>
<t id="44">Unmet Promise</t>
<t id="45">Fervid Corona</t>
<t id="46">Gushing Spring</t>
<t id="47">Furnace Chamber</t>
<t id="48">Forty-Two</t>
<t id="49">Magma Pool</t>
<t id="50">Darned Hot Air</t>
<t id="51">Radiation Belt</t>
<t id="52">Fifteen Rays</t>
<t id="53">Scorched Aura</t>
<t id="54">Vapour Stream</t>
<t id="55">Lava Flow</t>
<t id="56">Extinct Torch</t>
<t id="57">Fiendish Moloch</t>
<t id="58">Gatekeeper's House</t>
<t id="59">The Fallen Kingdom</t>
<t id="60">Last Stand</t>
<t id="61">Voracious Lady</t>
<t id="62">Aerodrome</t>
<t id="63">Icy Tears</t>
<t id="64">Thriving Fields</t>
<t id="65">Double Junction</t>
<t id="66">Wavy Haze</t>
<t id="67">Pearly Shore</t>
<t id="68">Murky Skies</t>
<t id="69">Ratfish Waters</t>
<t id="70">The Great Basin</t>
<t id="71">Twin Tempest</t>
<t id="72">Relocating Stones</t>
<t id="73">The Smoke Screen</t>
<t id="74">Drippy Ascent</t>
<t id="75">Aspiring Champion</t>
<t id="76">High Scholar</t>
<t id="77">Gleam Of Hope</t>
<t id="78">Towering Heavens</t>
<t id="79">Everlasting Warden</t>
<t id="80">The Vindicator</t>
<t id="81">Paramount Benefactor</t>
<t id="82">Magnificent Templar</t>
<t id="87">Keen Chant</t>
<t id="88">Silent Void</t>
<t id="89">Path Of Glory</t>
<t id="90">Solitude</t>
<t id="91">Cosy Shade</t>
<t id="92">Eternal Dawn</t>
<t id="93">Illusory Rest</t>
<t id="94">Alpha Quadrant</t>
<t id="95">Aged Ductwork</t>
<t id="96">Grim Keepers</t>
<t id="97">Timid Star</t>
<t id="98">Inviting Colossus</t>
<t id="99">Blast Quarry</t>
<t id="100">Sturdy Crusader</t>
<t id="101">Sunken Frigate</t>
<t id="102">Imminent Mischief</t>
<t id="103">Deceptive Dead End</t>
<t id="104">Prevarication</t>
<t id="105">Unending Path</t>
<t id="106">Indignity</t>
<t id="107">Twisted Faith</t>
<t id="108">The Sixth Scripture</t>
<t id="109">Shattered Singularity</t>
<t id="110">Venturous Profit</t>
<t id="111">Schrödinger's Drift</t>
<t id="112">Time Distortion</t>
<t id="113">Gravity Anomaly</t>
<t id="114">Cryptic Heart</t>
<t id="115">Verdant Profit</t>
<t id="116">Last Resort</t>
<t id="117">Silent Night</t>
<t id="118">Serpent's Tail</t>
<t id="119">Shadow's Heart</t>
<t id="120">Postern Gate</t>
<t id="121">Scaleplate Pact</t>
<t id="122">Hissed Syllable</t>
<t id="123">Leap of Faith</t>
<t id="124">Sea-green Oasis</t>
<t id="125">Corsair's Gambit</t>
<t id="126">Sanctuary</t>
<t id="127">Biting Steel</t>
<t id="128">Risky Deal</t>
<t id="129">Gantelios' Bane</t>
<t id="200">Empty Space</t>
<t id="301">Black Body Enclosure</t>
<t id="302">Sermon of Nothingness</t>
<t id="303">Salient Point</t>
<t id="304">Agonizing Pain</t>
<t id="305">Faraway Balcony</t>
<t id="306">Auxilliary Gateway</t>
<t id="307">Curvy Drift</t>
<t id="308">Fool's Errand</t>
<t id="309">Cerebral Fault</t>
<t id="310">Insignificant Other</t>
<t id="311">Unknown Threat</t>
<t id="312">Community Garden</t>
<t id="314">Uncanny Approach</t>
<t id="315">Grim Seat</t>
<t id="316">Lost Case</t>
<t id="317">Superior Route</t>
<t id="318">Ruptured Defence</t>
<t id="319">Eternity</t>
<t id="320">The Last Resort</t>
<t id="321">Gargantuan Emptiness</t>
<t id="322">Colourful Scarf</t>
<t id="323">Blasted Arc</t>
<t id="324">Apotheosis</t>
<t id="325">The Spice</t>
<t id="326">Unheeded Advice</t>
<t id="327">Nameless Heights</t>
<t id="328">Blown Chance</t>
<t id="329">Numbered Day</t>
<t id="330">Lost Corner</t>
<t id="331">Black Ocean</t>
<t id="332">Eureka Eight</t>
<t id="333">Blatant Mistake</t>
<t id="334">Garnered Crown</t>
<t id="335">Outrage</t>
<t id="336">Drawn Sabres</t>
<t id="337">Crammed Palace</t>
<t id="338">Skimmed Evil</t>
<t id="339">Computational Error</t>
<t id="340">Primitive Reaches</t>
</page>

<page id="20006" title="Miscellaneous Locations" descr="Text for Miscellaneous Locations" voice="yes">
<t id="101">Unknown System</t>
<t id="201">Unknown Sector</t>
<t id="301">Unknown Zone</t>
</page>
So the code that are in the mod must do it. Or should be. :?

Code: Select all

		<find_zone name="$zones" space="player.galaxy" multiple="true" >
			<match class="class.highway" negate="true"/>
 		</find_zone>
		<do_all exact="$zones.count" counter="$i">
		  <do_if value="$zones.{$i}.name != 'Empty Space' and $zones.{$i}.name != 'Unknown Zone' and player.primaryship.zone != $zones.{$i}" >
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

@DaveDee
I made a routine that can show me all outposts on a saved game. Tried it on an 85 hrs game play saved game: with 74 total Outposts none in empty space or unknwon zone. So, it´s working! If you want this small file i can send it to you or just send your saved game that i will look into.

I will upload a small fix anyway that only allow main factions to build strongholds. I forget it since V015s when i limited the war (invasions) to PMC, Canteran, Pirates and Xenon but not the possibility to build strongholds for others big factions.
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

@Rubini

Sry, it was 2am here, so I went to sleep.
Am i understand you right, you're using exact names for zones? Or is it just some internal title, not affected by localisation? Cause, you now, i'm playing with russian one.

If you want this small file i can send it to you or just send your saved game that i will look into.
Sure
DaveDee
Posts: 285
Joined: Sat, 18. Oct 14, 13:10
x4

Post by DaveDee »

Well, think i'm right.

Started new game with 44 lang. After 30 minutes of simulating normal gaming - no strongholds in empty space. Only one in Scorched Aura, but thats should be normal, as i can see from your code .

Saved game and changed lang back to 07. Got new stronghold in empty space about 15 seconds after loading...

Exited without saving, lang to 44 again - 5 minutes after loading without strongholds.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Rubini wrote:So the code that are in the mod must do it. Or should be. :?

Code: Select all

		<find_zone name="$zones" space="player.galaxy" multiple="true" >
			<match class="class.highway" negate="true"/>
 		</find_zone>
		<do_all exact="$zones.count" counter="$i">
		  <do_if value="$zones.{$i}.name != 'Empty Space' and $zones.{$i}.name != 'Unknown Zone' and player.primaryship.zone != $zones.{$i}" >
checking for Zone NAMES is very,very bad practice because its language dependent. in German these two are called "Leerer Raum" or "Unbekannte Zone" for example. if you want to keep this method at least compare it with a String read from the Text DB instead of hard-coding it:
<do_if value="$zones.{$i}.name != {20005,200} and $zones.{$i}.name != {20006,301} and player.primaryship.zone != $zones.{$i}" >
i also know there is a property for zones which returns if a Zone is temporary, but currently i cannt look it up so im guessing the term (.istempzone) -> so this check could be generalised to:
<do_if value="not $zones.{$i}.istempzone and $zones.{$i}.name != {20006,301} and player.primaryship.zone != $zones.{$i}" >
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 ;)
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

@Davedee,
@Unitrader,

Thanks by the feedback and inputs! Yes, the language is the obvious culprite. I will look for this and any other reference in code that can affect dif. languages and will post a hotfix. Many Thanks! Problem solved! :wink:


Edited: and a total language adaptation of the mod is on to do list, but as always all my free time is being consumed by the code itself. If someone could help will be very welcome. :)
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Just to clarify, can be useful for others:

The correct usage seems that is (istemporaryzone):

Code: Select all

<do_if value="not $zones.{$i}.istemporaryzone and $zones.{$i}.name != {20006,301} and player.primaryship.zone != $zones.{$i}" >

The term "tempzone" is an attribute:

Code: Select all

<find_zone name="$targetzone" space="$space"  tempzone="false">

Return to “X Rebirth - Scripts and Modding”