XMLAppendSubElement perhaps?

Freeform discussion about anything related to modding Transcendence.
Post Reply
Militia Captain
Militia Captain
Posts: 841
Joined: Tue Nov 05, 2013 9:56 am

Fri Mar 10, 2017 1:01 am

IMPORTANT EDIT: This typo was inadvertently carried over to NMS's 'xml modification tutorial' topic;

Code: Select all

<SellShip criteria="s; L:1-13;" priceAdj="110"/>
There should NOT be a semi-colon ; after the 's' criteria. This has been corrected further down in this post.

Is there a way to add <Trade> info to a station without overwriting the whole station code?

This is the Korolov Shipping <Trade> code

Code: Select all

<Trade currency="credit" max="100000" replenish="5000">
	<Sell	criteria="*NU -illegal; -notForSale; -notStandard;"	priceAdj="110"	noDescription="true"/>

	<Refuel			criteria="f +BasicFuel; L:1-5;" priceAdj="90"/>
	<RepairArmor	criteria="a L:1-8;" priceAdj="100"/>
	<ReplaceArmor	criteria="a L:1-8;" priceAdj="100"/>
	<InstallDevice	criteria="d L:1-6;" priceAdj="100"/>
	<RemoveDevice	criteria="d L:1-6;" priceAdj="100"/>
I would like to add

Code: Select all

	<SellShip	criteria="s L:1-13;" priceAdj="110"/>
without having to add the nearly 2000 lines of Korolov code to a mod to overwrite it.

I'm assuming, if its possible, that it would be by using XML functions, in particular XMLAppendSubElement.
Does anyone know the format to use for this? All my tries have come up as "Line 1: Mismatched quote" or "Invalid XML Element".
Last edited by relanat on Tue Mar 14, 2017 11:22 pm, edited 1 time in total.
Stupid code. Do what I want, not what I typed in!

Militia Captain
Militia Captain
Posts: 560
Joined: Tue Mar 05, 2013 8:26 am

Sat Mar 11, 2017 8:29 am

We've been in need of a tutorial on these functions, so I used this as an example to write one:

Post Reply