Script & Mod Requests

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

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

ravayen
Posts: 56
Joined: Mon, 25. Jan 16, 02:02
x4

Post by ravayen » Fri, 14. Jul 17, 14:13

Seta in menus and map.
A lot of the time i find myself wishing i could use seta with the map open so i can watch a ship travel somewhere if anyone could make a mod to enable it in maps and menus thats would be awesome also if its just a simple edit feel free to point me to the right file and i'll post a mod myself thanks ;)

Better Logbook info.
Logbook tells you which station was a trade ships' commander when it's destroyed, seriously how many times do you read in the log that one of your trade ships got killed but have no idea which bloody trade ship it was coz you have more than one assigned to your stations and so an upkeep mission doesn't appear.

Tharrg
Posts: 257
Joined: Thu, 17. Feb 05, 16:09
x4

Post by Tharrg » Fri, 4. Aug 17, 17:44

I am trying to find a mod to rename my Faction, but can't find one.

It should just be a text replace, change "Ren Otani" to "Honest RO's space wares" or something similar (or completely different).

I am hoping that my googling is just inept.

SteinHU
Posts: 2
Joined: Fri, 28. Aug 15, 14:47
x4

Post by SteinHU » Thu, 31. Aug 17, 16:02

There is any mod, or mod combination, that can can do that?
- no local highway
- superhighways and gates work like normal
- every ship have some kind of booster (like capital booster) to move around and the AI can use the boosters

I didnt read trugh the whole topic, i did some search for a mod like this, but no luck so far. I found only one mod, which removes the superhighways and gates as well.

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

Already possible

Post by Realspace » Thu, 2. Nov 17, 09:19

I made one years ago, it removes only the local highways. Then there is a mod around that increases the speed of NPC ships. I did it too in my mod but it is old so no more compatible, you can still use the no-highway modification though, it is a very simple mod. See the signature to download or add an empty file to replace the one listing highways (see inside my mod which one, it is self-explicit)

urboyfriend
Posts: 1
Joined: Sat, 4. Nov 17, 00:12

Post by urboyfriend » Sat, 4. Nov 17, 00:13

im looking for a mod that disables lighting, is there such thing?

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sat, 23. Dec 17, 20:29

Prompt who knows. A script is needed that will update all the ships in the galaxy.

I tried different ways that I knew, not one worked correctly.

Gods of script writing, help, please.

It is necessary to apply the changes, but without a script, neither does it come out.

(Engines, radars, shields) on the boxes and drones.

Besides Skunk.

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

Post by UniTrader » Sat, 23. Dec 17, 22:32

written from heat without xsd; might contain errors..

Code: Select all

<mdscript name="UpdateShips">
  <cues>
    <cue name="Update_1">
      <conditions>
        <event_game_loaded/>
      </conditions>
      <actions>
        <update_macros macro="macro.*macro_to_update*"/>
        <!-- copy previous Line for each Macro which needs updating in the same Version -->
      </actions>
    </cue>
    <!-- copy previous Cue in case a new Version with other changes is released and change Name. Also comment out duplicate entries in previous Versions -->
  </cues>
</mdscritpt>

or do you want a complete global update_macro regardless of need? then these actions should do the trick:
[/code]<find_ship name="$ships" space="player.galaxy" multiple="true"/>
<remove_value name="$ships.{$ships.indexof.{player.primaryship}}"/>
<do_all exact="$ships.count" counter="$i">
<update_macro object="$ships.{$i}"/>
</do_all>[/code]
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
Marvin Martian
Posts: 3545
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Sat, 23. Dec 17, 22:48

instead of update_macro(s) it's patch_macro(s)

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 24. Dec 17, 00:26

Its not worck :cry:

I tried different combinations

patch_macro
patch_macros
update_macro
update_macros

Code: Select all


<?xml version="1.0" encoding="utf-8" ?>
<mdscript name="patch_skunk_reballans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
  <cues>
    <cue name="patch_skunk_r" version="1">
      <conditions> 
		 <event_game_loaded/>
      </conditions> 
      <actions> 
          <find_ship name="$ships" space="player.galaxy" multiple="true"/> 
          <remove_value name="$ships.{$ships.indexof.{player.primaryship}}"/> 
             <do_all exact="$ships.count" counter="$i"> 
                 <patch_macro object="$ships.{$i}"/> 
            </do_all>
      </actions> 
     </cue> 
  </cues> 
</mdscript>

{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 24. Dec 17, 03:16

Look. It is correct? Or something to add / change?

Why your option did not work, I do not understand. ((

Code: Select all

<?xml version="1.0" encoding="utf-8" ?> 
<mdscript name="patch_skunk_reballance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd"> 
  <cues> 
    <cue name="patch_ships_reballance"> 
      <conditions> 
       <event_game_loaded/> 
      </conditions> 
      <actions> 
        <set_value name="$ship_count" exact="0"/> 
        <set_value name="$patch_count" exact="0"/> 
        <set_value name="$patching_ships" exact="[]"/> 
		<find_ship name="$ships" multiple="true" space="player.galaxy"/> 
		  <remove_value name="$ships.{$ships.indexof.{player.primaryship}}"/>
          <set_value name="$ship_count" exact="$ships.count" operation="add"/> 
          <do_all exact="$ships.count" counter="$s"> 
            <append_to_list name="$patching_ships" exact="$ships.{$s}"/> 
              <find_object_component name="$components" class="[class.engine]" object="$ships.{$s}" multiple="true"/>			  
              <set_value name="$patch_count" exact="$components.count" operation="add"/> 
              <do_all exact="$components.count" counter="$c"> 
                <destroy_object object="$components.{$c}" explosion="false"/> 
				<restore_object object="$components.{$c}" hull="100" recursive="true" />	
                <set_object_shield object="$components.{$c}" exact="100"/>				
                <debug_text filter="general" text="' ///  Destroyed module: %1 ===  on ship:  %2 === in zone: %3 .'.[$components.{$c}.knownname, $ships.{$s}.knownname, $ships.{$s}.zone.knownname]"/> 
              </do_all>
             </do_all>  
         <debug_text filter="general" text="'\n\n Destroy objects: %1  on %2 ships.\n\n'.[$patch_count, $ship_count]"/> 
      </actions>
     <cues> 
        <cue name="Patch_ship_all"> 
          <delay exact="5s"/> 
          <actions> 
		    <do_all exact="$ships.count" counter="$s"> 
			 <set_value name="$ship_count" exact="$ships.count" />
              <patch_macro object="$ships.{$s}" />               		  
            </do_all> 	
              <debug_text filter="general" text="'    Ships Patched: - %1 ...'.[$ship_count]"/>		
          </actions> 
        </cue> 
      </cues> 
    </cue> 
  </cues> 
</mdscript>

Code: Select all


[General] 1234743.47 *** Context:md.patch_skunk_reballance.patch_ships_reballance:  ///  Destroyed module: Matter/Antimatter Drive ===  on ship:  RYK Fighter Squadron Skull Crusher === in zone: Prevarication .
[General] 1234743.47 *** Context:md.patch_skunk_reballance.patch_ships_reballance:  ///  Destroyed module: Matter/Antimatter Drive ===  on ship:  RYK Fighter Squadron Bonescout === in zone: Prevarication .
[General] 1234743.47 *** Context:md.patch_skunk_reballance.patch_ships_reballance: 

 Destroy objects: 10460  on 4713 ships.


[General] 1234748.48 ======================================
[=ERROR=] 1234748.48 Error in MD cue md.patch_skunk_reballance.Patch_ship_all: Evaluated component 0x25c8 does not exist any more
* Expression: $ships.{$s}
[General] 1234748.48 ======================================
[General] 1234748.48 ======================================
[=ERROR=] 1234748.48 Error in MD cue md.patch_skunk_reballance.Patch_ship_all: Evaluated component 0x40a9 does not exist any more
* Expression: $ships.{$s}
[General] 1234748.48 ======================================

[General] 1234748.48 ======================================
[General] 1234748.48 *** Context:md.patch_skunk_reballance.Patch_ship_all:     Ships Patched: - 4713 ...



User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 24. Dec 17, 18:14

Tell me where the error is. Why does not it work . ? :(

The component is deleted, but not patch.

Code: Select all

<?xml version="1.0" encoding="utf-8" ?> 
<mdscript name="patch_skunk_reballance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd"> 
	<cues> 
		<cue name="patch_ships_reballance" version="1">  
			<conditions> 
				<event_game_loaded/> 	   
			</conditions> 
			<actions> 
				<set_value name="$E_engines_count" exact="0"/> 
				
				<find_ship name="$ships" space="player.galaxy" multiple="true"/> 
				<remove_value name="$ships.{$ships.indexof.{player.primaryship}}"/> 
					<do_all exact="$ships.count" counter="$i"> 
						<find_object_component name="$components" class="[class.engine]" object="$ships.{$i}" multiple="true"/>
							<do_all exact="$components.count" counter="$j">
								<destroy_object object="$components.{$j}" explosion="false"/>
								<set_value name="$E_engines_count" operation="add"/>								
							</do_all>
						<patch_macro object="$ships.{$i}"/>	
					</do_all>
					
				<debug_text filter="general" text="'Patched %2 engines in %1 Ships.'.[$ships.count,$E_engines_count]"/> 				
			</actions> 
		</cue> 
	</cues> 
</mdscript> 

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 25. Dec 17, 04:29

OK. Thank you guys for help. I managed to solve the problem. Not fast, but I'm glad. ))

Here is the code. Look. Perhaps you tell me something about the code .


Code: Select all

<?xml version="1.0" encoding="utf-8" ?> 
<mdscript name="patch_skunk_reballance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd"> 
   <cues> 
      <cue name="patch_ships_reballance_0_0_1">  
         <conditions> 
            <event_game_loaded/>        
         </conditions> 
         <actions> 		    
            <set_value name="$patching_ships" exact="[]"/> 
            <find_ship name="$ships" space="player.galaxy" multiple="true"/>
            <remove_value name="$ships.{$ships.indexof.{player.primaryship}}"/>
				<do_all exact="$ships.count" counter="$i"> 
					<append_to_list name="$patching_ships" exact="$ships.{$i}"/> 
					<find_object_component name="$components" class="[class.engine,class.weapon]" object="$ships.{$i}" multiple="true"/> 
						<do_all exact="$components.count" counter="$c"> 
							<destroy_object object="$components.{$c}" explosion="false"/>
						</do_all>
               </do_all>	   
         </actions> 
     <cues> 
        <cue name="Patch_ship_all_0_0_1"> 
		    <delay exact="5s"/> 
          <actions> 
          <do_all exact="$patching_ships.count" counter="$i">             
              <patch_macro object="$ships.{$i}"/> 
            </do_all>
				<remove_value name="$patching_ships" />					 
				<cancel_cue cue="this"/>
          </actions> 
        </cue> 
      </cues> 
    </cue> 
  </cues> 
</mdscript>

User avatar
Marvin Martian
Posts: 3545
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 25. Dec 17, 10:03

do this now finally work?
because destroy parts and "patch"/rebuild isn't working well in my opinion - haven't positive results yet

maybe a solution would if you want to replace engine_x with engine_y to check about the macro and only delete the right one
and/or add a second engine part with his own connections, then you can patch first and remove then only the old by macro very good
at capitals also you can use buildstep marker (<build mode="optional" sequence="A" stage="1" />) like at stations to "remove" an old component without the sideeffect if you simply delete the connection in the macro at existing ships the module will stay at 0,0,0
the stage isn't supported at ships, but work good for "outdated parts", but i don't know what's happend at smallships

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 25. Dec 17, 11:25

Thank you for your clarification.


This script is only needed to update a many ships of different classes.

for this mod

User avatar
Marvin Martian
Posts: 3545
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 25. Dec 17, 12:43

best is to start a new game for this reason

BTW take a look into 1.3
i would suppose to spend much more time to write correct xml patch code for the existing units instead of like it is handled now :sceptic:

EDIT
for example

Code: Select all

<replace sel="//connection[@ref='connection_engine01']/macro/@ref">engine_size_XL_41</replace>

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 25. Dec 17, 13:13

Thank you MM.

Unfortunately, for writing scripts, I do not have extensive knowledge, like you. For me, this creaking, a great victory.

I suggested that
Marvin Martian wrote:EDIT
for example

Code: Select all

<replace sel="//connection[@ref='connection_engine01']/macro/@ref">engine_size_XL_41</replace>
the author do this two weeks ago, but the change will take a long time. If, I have free time, I will help him with this.

This is his first mod. :)
Marvin Martian wrote:best is to start a new game for this reason[/code]
As one of the options. But as you know, everyone likes to continue the game. :) :roll:

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 14. Jan 18, 04:08

OK. One more question.

How to remove from the ship seller's station using the script?

Big and small ships.

Thank you.

Tycho Celchu
Posts: 3
Joined: Wed, 28. Mar 18, 17:39
x4

Post by Tycho Celchu » Wed, 28. Mar 18, 18:42

An option to tell your engineers, what components to repair, or give them repair priorities would be nice. The only one I found is Improved Engineer https://www.nexusmods.com/xrebirth/mods ... escription
but it wasn't updated since 2013 and was reported broken by users.

Luke0086
Posts: 260
Joined: Wed, 3. Sep 14, 19:51

Post by Luke0086 » Sat, 19. May 18, 23:08

Is it possible to make Capital Ships shoot those moving mines? They simply devestate captals and they don't stand a chance.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 20. May 18, 09:18

Luke0086 wrote:Is it possible to make Capital Ships shoot those moving mines? They simply devestate captals and they don't stand a chance.
There is a mod that removes mines.

https://drive.google.com/file/d/1udxrLk ... sp=sharing

https://steamcommunity.com/sharedfiles/ ... /374543671

https://steamcommunity.com/sharedfiles/ ... =374543671

Post Reply

Return to “X Rebirth - Scripts and Modding”