help with editing weapons
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
need help with this, im trying to make my new weapons buyable
Setup.xml
the result is
Setup.xml
Code: Select all
<replace sel="/mdscript/cues/cue[@name='WeaponTraderBasket2']/actions/set_value[@name='md.$WeaponUpgradetraderLists']">
<set_value name="md.$WeaponUpgradetraderLists" exact="
[
[
[ware.upg_pla_weapon_ie_mk1, 1, 1, 100],
[ware.upg_pla_weapon_ie_mk2, 0, 0, 0],
[ware.upg_pla_weapon_pe_mk1, 1, 1, 100],
[ware.upg_pla_weapon_pe_mk2, 0, 0, 0],
[ware.upg_pla_weapon_sg_mk1, 1, 1, 100],
[ware.upg_pla_weapon_sg_mk2, 0, 0, 0],
[ware.upg_pla_weapon_mg_mk1, 1, 1, 100],
[ware.upg_pla_weapon_mg_mk2, 0, 0, 0],
[ware.upg_pla_weapon_mg_mk3, 0, 0, 0],
[ware.upg_pla_weapon_ml_mk1, 1, 1, 100],
[ware.upg_pla_weapon_ml_mk2, 0, 0, 0],
[ware.upg_pla_weapon_ml_mk3, 0, 0, 0],
[ware.upg_pla_weapon_hept, 0, 0, 0]
[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]
[ware.upg_pla_weapon_cpe_mk2, 1, 1, 100]
[ware.upg_pla_weapon_gauss_mk1, 1, 1, 50]
]
]
"/>
</replace>
Code: Select all
[General] ======================================
[=ERROR=] ERROR: The Upgrade Trader warelist does not contain ALL playership upgrades - Florian
[General]
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
Missed a couple of commas in the end.

xrook wrote:Code: Select all
[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100] [ware.upg_pla_weapon_cpe_mk2, 1, 1, 100] [ware.upg_pla_weapon_gauss_mk1, 1, 1, 50]
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
still same result, can anyone give me the rundown on how to add new weapons on the mechanic? i might be missing something
EDIT:
EDIT:
Code: Select all
[General] ======================================
[=ERROR=] Skipping MD file extensions\Skunk_Overhaul\md\Setup.xml: Script name 'Setup' already found in file md\setup.xml
[General] ======================================
[General] ======================================
[=ERROR=] ERROR: The Upgrade Trader warelist does not contain ALL playership upgrades - Florian
[General] ======================================
-
- Posts: 1896
- Joined: Fri, 18. Jul 14, 05:28
Code: Select all
<replace sel="/mdscript[@name='Setup']/cues/cue[@name='WeaponTraderBasket2']/actions/set_value[@name='md.$WeaponUpgradetraderLists']">
<set_value name="md.$WeaponUpgradetraderLists" exact="
[
[
[ware.upg_pla_weapon_ie_mk1, 2, 2, 100],
[ware.upg_pla_weapon_ie_mk2, 2, 2, 100],
[ware.upg_pla_weapon_pe_mk1, 2, 2, 100],
[ware.upg_pla_weapon_pe_mk2, 2, 2, 100],
[ware.upg_pla_weapon_sg_mk1, 2, 2, 100],
[ware.upg_pla_weapon_sg_mk2, 2, 2, 100],
[ware.upg_pla_weapon_mg_mk1, 2, 2, 100],
[ware.upg_pla_weapon_mg_mk2, 2, 2, 100],
[ware.upg_pla_weapon_mg_mk3, 2, 2, 100],
[ware.upg_pla_weapon_ml_mk1, 2, 2, 100],
[ware.upg_pla_weapon_ml_mk2, 2, 2, 100],
[ware.upg_pla_weapon_ml_mk3, 2, 2, 100],
[ware.upg_pla_weapon_hept, 2, 2, 100],
[ware.upg_pla_weapon_cpe_mk1, 2, 2, 100],
[ware.upg_pla_weapon_cpe_mk2, 2, 2, 100],
[ware.upg_pla_weapon_gauss_mk1, 2, 2, 100]
]
]
"/>
</replace>
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Posts: 2963
- Joined: Tue, 18. Nov 14, 16:23
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Posts: 1017
- Joined: Mon, 4. Aug 14, 05:18
Interesting progress you are making here, some of your discoveries may have a drastic impact to the Katana Mod, where I was attempting to make dual and quad weapons systems, but was never able to sync them (I have currently run out of steam for modding atm, so feel free to take a look at Katana Mod and release something if you feel inclined to do so).
0101...0011...0011...0101...2!
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
Isn't this value defined in the bullet file itself?
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: 205
- Joined: Fri, 31. Jul 15, 01:25
i wanted to see and record live results since im experimenting with weapons
but right now im concerned about how i patched the setup.xml, wont it cause incompatibilities with other mods??
is there a way to specifically add it inside without replacing the entire thing?
as you can see i have no idea with what im doing
but right now im concerned about how i patched the setup.xml, wont it cause incompatibilities with other mods??
is there a way to specifically add it inside without replacing the entire thing?
as you can see i have no idea with what im doing
Code: Select all
<add sel="/mdscript[@name='Setup']/cues/cue[@name='Start']">
<patch sinceversion="2" state="complete">
<do_all exact="md.$WeaponUpgradetraderLists.{1}.count" counter="$i">
<set_value name="md.$WeaponUpgradetraderLists.{1}.{$i + 1}" exact=
"
[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]
" operation="insert"/>
<break/>
</do_all>
</patch>
</add>
<add sel="/mdscript[@name='Setup']/cues/cue[@name='WeaponTraderBasket2']">
<patch sinceversion="" state="complete">
<do_all exact="md.$WeaponUpgradetraderLists.{1}.count" counter="$i">
<set_value name="md.$WeaponUpgradetraderLists.{1}.{$i + 1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]" operation="insert"/>
<break/>
</do_all>
</patch>
</add>
<add sel="/mdscript[@name='Setup']/cues/cue[@name='WeaponTraderBasket3']">
<patch sinceversion="2" state="complete">
<do_all exact="md.$WeaponUpgradetraderLists.{1}.count" counter="$i">
<do_if value="md.$WeaponUpgradetraderLists.{1}.{$i}.{1}" exact="ware.upg_pla_weapon_mg_mk2">
<set_value name="md.$WeaponUpgradetraderLists.{1}.{$i + 1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]" operation="insert"/>
<break/>
</do_if>
</do_all>
</patch>
</add>
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
noone? it will cause problems to future mods that add wares to the game you know, i have my own drone now but i just cant add it to wares because i have 'repair laser drone' mods installed, so i cant just <replace> his <replace>
there should be a set standard on how modders will add wares into the game
there should be a set standard on how modders will add wares into the game
-
- Posts: 3614
- Joined: Sun, 8. Apr 12, 09:40
Code: Select all
<do_all exact="md.$WeaponUpgradetraderLists.{1}.count" counter="$i">
<set_value name="md.$WeaponUpgradetraderLists.{1}.{$i + 1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]" operation="insert"/>
<break/>
</do_all>
so even better try
Code: Select all
<set_value name="md.$WeaponUpgradetraderLists.{1}.{md.$WeaponUpgradetraderLists.{1}.count + 1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]" operation="insert"/>
-
- Moderator (Script&Mod)
- Posts: 14571
- Joined: Sun, 20. Nov 05, 22:45
the best method i found was to modify the trader baskets after they are created.
for that write a new MD-Script which waits for the start cue to be completed and then adds the Wares to the Trader Lists:
note that when setting up the initial List or updating it during the Plot there is a short gap where your Weapon is not in the List and Traders created during this time wont have the related Weapon in stock - you have to switch Zones once to generate Trades who take these changes into account
for that write a new MD-Script which waits for the start cue to be completed and then adds the Wares to the Trader Lists:
Code: Select all
<mdscript name="Xrook_Add_Weapons" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://utnas/~unitrader/XRebirthxsds/md.xsd">
<cues>
<cue name="Start" checktime="5s" checkinterval="5s">
<conditions>
<cue_is_complete cue="md.Setup.Start"/>
</conditions>
<actions>
<append_to_list name="md.$WeaponUpgradetraderLists.{1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]"
</actions>
</cue>
<cue name="Refresh" instantiate="true">
<conditions>
<check_any>
<event_cue_completed cue="md.Setup.WeaponTraderBasket2"/>
<event_cue_completed cue="md.Setup.WeaponTraderBasket3"/>
</check_any>
</conditions>
<delay exact="5s"/>
<actions>
<append_to_list name="md.$WeaponUpgradetraderLists.{1}" exact="[ware.upg_pla_weapon_cpe_mk1, 1, 1, 100]"
</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: 205
- Joined: Fri, 31. Jul 15, 01:25
@marvin i got that code inside the setup.xml itself and thought maybe i could modify to make it add my wares
thx, ill try both, one by one
you guys should put it on the stickied XML Patch Guide

Code: Select all
<patch sinceversion="10" state="complete">
<do_all exact="md.$WeaponUpgradetraderLists.{1}.count" counter="$i">
<do_if value="md.$WeaponUpgradetraderLists.{1}.{$i}.{1}" exact="ware.upg_pla_weapon_mg_mk2">
<set_value name="md.$WeaponUpgradetraderLists.{1}.{$i + 1}" exact="[ware.upg_pla_weapon_mg_mk3, 0, 0, 0]" operation="insert"/>
<break/>
</do_if>
</do_all>
</patch>
you guys should put it on the stickied XML Patch Guide
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25
-
- Posts: 205
- Joined: Fri, 31. Jul 15, 01:25