Script & Mod Requests

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

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

ravayen
Posts: 37
Joined: Mon, 25. Jan 16, 03:02

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: 112
Joined: Thu, 17. Feb 05, 17:09
x2

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: 555
Joined: Wed, 15. Nov 06, 11:21
xr

Already possible

Post by Realspace » Thu, 2. Nov 17, 10: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, 01:12

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

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

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

Post by alexalsp » Sat, 23. Dec 17, 21: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: 13817
Joined: Sun, 20. Nov 05, 23:45
x4

Post by UniTrader » Sat, 23. Dec 17, 23: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: 2687
Joined: Sun, 8. Apr 12, 09:40
x4

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

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

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

Post by alexalsp » Sun, 24. Dec 17, 01: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: 829
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 24. Dec 17, 04: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: 829
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 24. Dec 17, 19: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: 829
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 25. Dec 17, 05: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: 2687
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 25. Dec 17, 11: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: 829
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 25. Dec 17, 12: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: 2687
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 25. Dec 17, 13: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>

Post Reply

Return to “X Rebirth - Scripts and Modding”