Script & Mod Requests
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 285
- Joined: Sat, 18. Oct 14, 13:10
-
- Posts: 285
- Joined: Sat, 18. Oct 14, 13:10
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
i could provide you an example Station i created a while ago, its unfinished and unreleased though but basically works (better place it in the center of its own Zone though because this thing is HUGE)
you can find it here:
https://gist.github.com/UniTrader/abef0de82a2fc9dda89c
uses only Vanilla Parts, no other mods required
maybe you should also provide your files, the problem might not be in your snippets but somewhere else...
you can find it here:
https://gist.github.com/UniTrader/abef0de82a2fc9dda89c
uses only Vanilla Parts, no other mods required
maybe you should also provide your files, the problem might not be in your snippets but somewhere else...
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
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

-
- Posts: 285
- Joined: Sat, 18. Oct 14, 13:10
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
'Drone & Highway issues'xrook wrote:do mod request usually get done? or most of the ideas just get left behind here cuz i have another one
'mining mod scanner upgrade MK2'
-asteroids get color coded similar to stations while in station scan mode
-removes restriction of needing a mining vessel
'targeting software MK3'
-ability to aim assist to target and shoot down enemy missiles
-really expensive
'improve missions that involve killing xenon or pirates'
-pirates and xenon shouldnt even use highways, if your a criminal the things you want to avoid is highways. i could practically camp at the spot the come out and give them missiles as give away presents
pirates and xenon should come in large groups (sometimes they do but sometimes i see a hard difficulty mission where they just pop 1-3 each wave) and spawn in different directions when attacking a station, up, down, north, south etc.
make it into a realistic ambush look
'improve activity outside of station zones'
most of the activity is inside station zones where you see a small group of raiders harassing the locals and traders
but they are pretty much giving themselves a death sentence as stations can easily take them down
'improve bounty missions'
most of the time the capital ship you were told to kill spawns near a station or them flying towards it, eventually leading to a mission failure because the game wants you to kill it and not the station.
although i found a work around this by targeting their engines first stopping them at their tracks
being a person with a huge bounty on their head, they should atleast avoid station zones
-spawn them on empty zones would be more logical as your practically hunting them
'make the game feel a little more "alive"'
~trigger unlocks after chapter 3~ (same condition as the mk2 cannon and mg)
condition
-when player enters a sector the game chooses 1 random dynamic mission and place that mission randomly within that sector
. *out of station zone skirmishes between plutarc and albion
--winning condition
------- when all the plutarc fleet are destroyed
--losing condition
------- when all your allied forces are destroyed
notes: there are more plutarc forces than the albion as the player is more than enough to change the battle outcome, but that doesnt mean plutarc automatically wins by default if left alone (all depends on the balance of the OOZ combat calculations)
. *help albion capture a plutarc station zone
--winning conditions
------- when your allied forces successfully boarded and captured the enemy station
------- increase chances of boarding success by doing the minigame similar to when you are boarding a capital ship
--losing conditions
------- when all your allied forces are destoyed
. *defend an albion related station zone from a plutarc invation
-- opposite of above
. *random skirmishes with xenon in or out of station zones (xenon vs plutarc, xenon vs plutarc vs albion, xenon vs albion)
--winning condition
------- when all enemy fleets are destroyed
--losing condition
------- when all your allied forces are destroyed
-dynamic missions are automatically added to your current active missions
-dynamic mission starts again after 20 min to 2 hours after finishing the last one (why? because doing this missions too frequently makes you feel less and less obligated to do them, also there plenty of other things to do
-dynamic missions can be ignored, leaving their fate to OOZ combat whether they will win or not
update the drone AI to make them not use highways, and not chase the enemies in highways, because the drones never come back when they do
Last edited by xrook on Sun, 20. Sep 15, 21:41, edited 2 times in total.
-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
Ok. Who can help?
I want to add to the list of buildings 2 fighter to Civ Ship Dockyard
assets\structures\Economy\production\macros\struct_econ_prod_shipm_macro.xml
assets\structures\Economy\production\macros\struct_econ_prod_ships_macro.xml
This works without problems on the new game. But it is not working with the game already started.
It is necessary to update the list of buildings at the shipyard. But I do not know how.
I will be grateful for any help. If someone will write the md, it will be very good.
Thank you.
I want to add to the list of buildings 2 fighter to Civ Ship Dockyard
assets\structures\Economy\production\macros\struct_econ_prod_shipm_macro.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="//production/@wares">shp_m_pmc_xen_02 shp_m_ore_transporter shp_m_ice_collector shp_m_crystal_collector shp_m_container_transporter shp_m_energy_transporter shp_m_liquid_transporter shp_m_ions_collector shp_m_hydrogen_collector</replace>
<add sel="//production/queue">
<item ware="shp_m_pmc_xen_02"/>
</add>
</diff>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="//production/@wares">shp_s_pmc_xen_01 shp_s_military_07 shp_s_military_08 shp_s_military_09 shp_s_pmc_01 shp_s_pmc_02 shp_s_pmc_03 shp_s_ship_04 shp_s_ship_23 shp_s_ship_19 shp_s_ship_07 shp_s_ship_01 shp_s_ship_03 shp_s_ship_02 shp_s_ship_05 shp_s_torpedo_01</replace>
<add sel="//production/queue">
<item ware="shp_s_pmc_xen_01"/>
</add>
</diff>
It is necessary to update the list of buildings at the shipyard. But I do not know how.
I will be grateful for any help. If someone will write the md, it will be very good.
Thank you.
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
you have to update the macro with
<patch_macros macro="macro.*yourchangedmacro*"/>
this will search the whole Universe for the given Macro and update it to the current Game Data. just use it inside the actions of a new root Cue without any conditions, this executes it on Game Start and Load exactly once
<patch_macros macro="macro.*yourchangedmacro*"/>
this will search the whole Universe for the given Macro and update it to the current Game Data. just use it inside the actions of a new root Cue without any conditions, this executes it on Game Start and Load exactly once

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
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

-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
Hi UniTraderUniTrader wrote:you have to update the macro with
<patch_macros macro="macro.*yourchangedmacro*"/>
this will search the whole Universe for the given Macro and update it to the current Game Data. just use it inside the actions of a new root Cue without any conditions, this executes it on Game Start and Load exactly once
Thanks for your reply, but
I have tried the such options, but the list is not updated. I checked all the files that belong to the a shipyard, but no result.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="ms_patch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="ms_ship_patch">
<conditions>
<event_game_loaded/>
</conditions>
<actions>
<patch_macros macro="macro.props_surf_playerdock_ships_macro"/>
<patch_macros macro="macro.struct_econ_prod_ships_macro"/>
<patch_macros macro="macro.struct_econ_prod_shipm_macro"/>
<patch_macros macro="macro.control_room_macro"/>
<patch_macros macro="macro.cargobay_station_ship_s_macro"/>
<patch_macros macro="macro.props_surf_playerdock_ships_macro"/>
<patch_macros macro="macro.storage_station_ship_m_macro"/>
<patch_macros macro="macro.struct_bt_alb_small_ships_yard_macro"/>
</actions>
</cue>
</cues>
</mdscript>
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
looks right.. iirc the macro of the Shipyard as whole should be enough
is this code actually executed when you want it to execute? please verify with a <debug_text filter="general" text"SUCESS"/> or something like this
is this code actually executed when you want it to execute? please verify with a <debug_text filter="general" text"SUCESS"/> or something like this
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
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

-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
just put it somewhere in the actions node. just noticed a mistake though: it should be text="'SUCESS'" (note the '' inside the "") but the effect is the same that you will find this SUCESS in your Debuglog when the related Code is executed
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
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

-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
I guess I'm not as written.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="ms_patch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="ms_ship_patch">
<conditions>
<event_game_loaded/>
</conditions>
<actions>
<patch_macros macro="macro.struct_bt_alb_small_ships_yard_macro"/>
<debug_text filter="general" text="SUCESS"/>
</actions>
</cue>
</cues>
</mdscript>
Code: Select all
[General] ======================================
[=ERROR=] Error in MD cue md.ms_patch.ms_ship_patch: Property lookup failed: SUCESS
* Expression: SUCESS
[General] ======================================
[General] *** Context:md.ms_patch.ms_ship_patch: null
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
Seems to work as planned, but if i understand you correctly the sub-components were not patched.
hmm, i was absolutely sure that patching an Object macro would also patch its components, but this seems not to be the case
try this inside actions:
replaces all other actions
hmm, i was absolutely sure that patching an Object macro would also patch its components, but this seems not to be the case

try this inside actions:
Code: Select all
<set_value name="$patch_count" exact="0" />
<find_station name="$stations" macro="macro.struct_bt_alb_small_ships_yard_macro" space="player.galaxy" multiple=true/>
<do_all exact="$stations.count" counter="$i">
<find_object_component name="$components" macro="macro.struct_econ_prod_shipm_macro" object="$stations.{$i}" multiple=true/>
<do_all exact="$components.count" counter="$j">
<patch_macro object="$components.{$j}"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<find_object_component name="$components" macro="macro.struct_econ_prod_ships_macro" object="$stations.{$i}" multiple=true/>
<do_all exact="$components.count" counter="$j">
<patch_macro object="$components.{$j}"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<patch_macro object="$stations.{$i}"/>
</do_all>
<debug_text filter="general" text="'Patched %1 Stations with %2 Components total'.[$stations.count,$patch_count"/>
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
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

-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
'add new bounty missions 1 v 1'xrook wrote:do mod request usually get done? or most of the ideas just get left behind here cuz i have another one
'mining mod scanner upgrade MK2'
-asteroids get color coded similar to stations while in station scan mode
-removes restriction of needing a mining vessel
'targeting software MK3'
-ability to aim assist to target and shoot down enemy missiles
-really expensive
'improve missions that involve killing xenon or pirates'
-pirates and xenon shouldnt even use highways, if your a criminal the things you want to avoid is highways. i could practically camp at the spot the come out and give them missiles as give away presents
pirates and xenon should come in large groups (sometimes they do but sometimes i see a hard difficulty mission where they just pop 1-3 each wave) and spawn in different directions when attacking a station, up, down, north, south etc.
make it into a realistic ambush look
'improve activity outside of station zones'
most of the activity is inside station zones where you see a small group of raiders harassing the locals and traders
but they are pretty much giving themselves a death sentence as stations can easily take them down
'improve bounty missions'
most of the time the capital ship you were told to kill spawns near a station or them flying towards it, eventually leading to a mission failure because the game wants you to kill it and not the station.
although i found a work around this by targeting their engines first stopping them at their tracks
being a person with a huge bounty on their head, they should atleast avoid station zones
-spawn them on empty zones would be more logical as your practically hunting them
'make the game feel a little more "alive"'
~trigger unlocks after chapter 3~ (same condition as the mk2 cannon and mg)
condition
-when player enters a sector the game chooses 1 random dynamic mission and place that mission randomly within that sector
. *out of station zone skirmishes between plutarc and albion
--winning condition
------- when all the plutarc fleet are destroyed
--losing condition
------- when all your allied forces are destroyed
notes: there are more plutarc forces than the albion as the player is more than enough to change the battle outcome, but that doesnt mean plutarc automatically wins by default if left alone (all depends on the balance of the OOZ combat calculations)
. *help albion capture a plutarc station zone
--winning conditions
------- when your allied forces successfully boarded and captured the enemy station
------- increase chances of boarding success by doing the minigame similar to when you are boarding a capital ship
--losing conditions
------- when all your allied forces are destoyed
. *defend an albion related station zone from a plutarc invation
-- opposite of above
. *random skirmishes with xenon in or out of station zones (xenon vs plutarc, xenon vs plutarc vs albion, xenon vs albion)
--winning condition
------- when all enemy fleets are destroyed
--losing condition
------- when all your allied forces are destroyed
-dynamic missions are automatically added to your current active missions
-dynamic mission starts again after 20 min to 2 hours after finishing the last one (why? because doing this missions too frequently makes you feel less and less obligated to do them, also there plenty of other things to do
-dynamic missions can be ignored, leaving their fate to OOZ combat whether they will win or not
'Drone & Highway issues'
update the drone AI to make them not use highways, and not chase the enemies in highways, because the drones never come back when they do
-a bounty mission assigned to kill a high skilled pilot (5 star skills)
-custom built version of existing fighter ships (sturdier hull, custom shield generators, more powerful guns, custom engine)
Last edited by xrook on Tue, 22. Sep 15, 12:32, edited 2 times in total.
-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
http://i.imgur.com/FgtidAu.png
http://i.imgur.com/zzcC9Sz.png
http://i.imgur.com/WoLVrC6.png
List of ships is not updated (((
http://i.imgur.com/zzcC9Sz.png
http://i.imgur.com/WoLVrC6.png
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="ms_patch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="ms_ship_patch">
<conditions>
<event_game_loaded/>
</conditions>
<actions>
<set_value name="$patch_count" exact="0" />
<find_station name="$stations" macro="macro.struct_bt_alb_small_ships_yard_macro" space="player.galaxy" multiple="true"/>
<do_all exact="$stations.count" counter="$i">
<find_object_component name="$components" macro="macro.struct_econ_prod_shipm_macro" object="$stations.{$i}" multiple="true"/>
<do_all exact="$components.count" counter="$j">
<patch_macro object="$components.{$j}"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<find_object_component name="$components" macro="macro.struct_econ_prod_ships_macro" object="$stations.{$i}" multiple="true"/>
<do_all exact="$components.count" counter="$j">
<patch_macro object="$components.{$j}"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<debug_text filter="general" text="'Patched %1 Stations with %2 Components total'.[$stations.count,$patch_count]"/>
</actions>
</cue>
</cues>
</mdscript>
Code: Select all
[[General] ======================================
[General] *** Context:md.ms_patch.ms_ship_patch: Patched 1 Stations with 4 Components total
[General] ======================================
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
'minimalistic hud for 3rd person view'xrook wrote:do mod request usually get done? or most of the ideas just get left behind here cuz i have another one
_____
'mining mod scanner upgrade MK2'
-asteroids get color coded similar to stations while in station scan mode
-removes restriction of needing a mining vessel
_____
'targeting software MK3'
-ability to aim assist to target and shoot down enemy missiles
-really expensive
_____
'improve missions that involve killing xenon or pirates'
-pirates and xenon shouldnt even use highways, if your a criminal the things you want to avoid is highways. i could practically camp at the spot the come out and give them missiles as give away presents
pirates and xenon should come in large groups (sometimes they do but sometimes i see a hard difficulty mission where they just pop 1-3 each wave) and spawn in different directions when attacking a station, up, down, north, south etc.
make it into a realistic ambush look
_____
'improve activity outside of station zones'
most of the activity is inside station zones where you see a small group of raiders harassing the locals and traders
but they are pretty much giving themselves a death sentence as stations can easily take them down
_____
'improve bounty missions'
most of the time the capital ship you were told to kill spawns near a station or them flying towards it, eventually leading to a mission failure because the game wants you to kill it and not the station.
although i found a work around this by targeting their engines first stopping them at their tracks
being a person with a huge bounty on their head, they should atleast avoid station zones
-spawn them on empty zones would be more logical as your practically hunting them
_____
'make the game feel a little more "alive"'
~trigger unlocks after chapter 3~ (same condition as the mk2 cannon and mg)
condition
-when player enters a sector the game chooses 1 random dynamic mission and place that mission randomly within that sector
. *out of station zone skirmishes between plutarc and albion
--winning condition
------- when all the plutarc fleet are destroyed
--losing condition
------- when all your allied forces are destroyed
notes: there are more plutarc forces than the albion as the player is more than enough to change the battle outcome, but that doesnt mean plutarc automatically wins by default if left alone (all depends on the balance of the OOZ combat calculations)
. *help albion capture a plutarc station zone
--winning conditions
------- when your allied forces successfully boarded and captured the enemy station
------- increase chances of boarding success by doing the minigame similar to when you are boarding a capital ship
--losing conditions
------- when all your allied forces are destoyed
. *defend an albion related station zone from a plutarc invation
-- opposite of above
. *random skirmishes with xenon in or out of station zones (xenon vs plutarc, xenon vs plutarc vs albion, xenon vs albion)
--winning condition
------- when all enemy fleets are destroyed
--losing condition
------- when all your allied forces are destroyed
-dynamic missions are automatically added to your current active missions
-dynamic mission starts again after 20 min to 2 hours after finishing the last one (why? because doing this missions too frequently makes you feel less and less obligated to do them, also there plenty of other things to do
-dynamic missions can be ignored, leaving their fate to OOZ combat whether they will win or not
_____
'Drone & Highway issues'
update the drone AI to make them not use highways, and not chase the enemies in highways, because the drones never come back when they do
_____
'add new bounty missions 1 v 1'
-a bounty mission assigned to kill a high skilled pilot (5 star skills)
-custom built version of existing fighter ships (sturdier hull, custom shield generators, more powerful guns, custom engine)
sticking to 1st person is great and all with "immersion" and VR but when not when creating videos and you cant even see the beauty of your ship
Last edited by xrook on Thu, 24. Sep 15, 14:50, edited 1 time in total.
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
completely forgot that i wanted to answer here..alexalsp wrote:....
your code above is not well-formed so it cannt work, but i think you just experimented a bit because your debug output suggests it worked once and you just posted a diffrent Version than executed (hint: always check if an XML is well-formed when saving - and on extension validate it from the XSD - this shows you the most simple mistakes in a file without even starting the Game

have an alternative solution i think, may be a bit radical though (but should work based on Info i got on the Topic about re-using Construction Vessels - the core issue is similiar here i think):
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<mdscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ms_patch" xsi:noNamespaceSchemaLocation="md.xsd">
<cues>
<cue name="ms_ship_patch">
<conditions>
<event_game_loaded/>
</conditions>
<actions>
<set_value name="$patch_count" exact="0"/>
<find_station name="$stations" macro="macro.struct_bt_alb_small_ships_yard_macro" space="player.galaxy" multiple="true"/>
<do_all exact="$stations.count" counter="$i">
<find_object_component name="$components" macro="macro.struct_econ_prod_shipm_macro" object="$stations.{$i}" multiple="true"/>
<do_all exact="$components.count" counter="$j">
<destroy_object object="$components.{$j}" explosion="false"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<find_object_component name="$components" macro="macro.struct_econ_prod_ships_macro" object="$stations.{$i}" multiple="true"/>
<do_all exact="$components.count" counter="$j">
<destroy_object object="$components.{$j}" explosion="false"/>
<set_value name="$patch_count" operation="add"/>
</do_all>
<patch_macro object="$stations.{$i}"/>
</do_all>
<debug_text filter="general" text="'Destroyed %2 Ship Production Components and Patched %1 Stations afterwards'.[$stations.count,$patch_count]"/>
</actions>
</cue>
</cues>
</mdscript>
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
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

-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
Sorry. Did not notice your message.
4 modules destroyed and no more. 
Code: Select all
[General] ======================================
[General] *** Context: md.ms_patch.ms_ship_patch: Destroyed 4 Ship Production Components and Patched 1 Stations afterwards
[General] ======================================

-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28