various questions and stuff

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

Fri Nov 09, 2018 1:10 am

I'm looking to check if a weapon has the ability to mine. I'm fairly sure there is a way to do this but can't think what it is. Something to do with damage type?
ATM I'm checking for the attribute 'miningEquipment' but this won't work if a weapon can mine but doesn't have that attribute.

NMS
Militia Commander
Militia Commander
Posts: 493
Joined: Tue Mar 05, 2013 8:26 am

Fri Nov 09, 2018 7:23 am

I think you'd have to use XML functions to get the damage string and find "mining:" in it.

relanat
Militia Captain
Militia Captain
Posts: 650
Joined: Tue Nov 05, 2013 9:56 am

Sat Nov 24, 2018 11:32 am

Thanks. I spotted code to do just that in the Weapons Lab Beta mod shortly after I posted the question.
-----------------

A lot of events, especially in missions, use the 'switch' function with only one option. I was wondering if there is a coding reason for doing this instead of using 'if'. Possibly it is just to make expanding the code easier?

relanat
Militia Captain
Militia Captain
Posts: 650
Joined: Tue Nov 05, 2013 9:56 am

Tue Jan 22, 2019 1:03 am

Multi-line text ids usually have a blank line at the beginning and end of the text content. I'm wondering if there is a text formatting reason for this or is it just to break up what can be a wall of text to make it easier to read and work with.

An example from one of the mining missions:

Code: Select all

<Text id="descSupervisor1">

	The colony supervisor stands at the center plugged in to his consoles and display.
	He turns his attention towards you as you approach:

	"Welcome to %stationName%! If you're looking for work, I might be able to set you up with something."

</Text>

NMS
Militia Commander
Militia Commander
Posts: 493
Joined: Tue Mar 05, 2013 8:26 am

Tue Jan 22, 2019 7:30 pm

That's just for code readability. The extra whitespace is removed.

Post Reply