curiostiy with <imagevariants>

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

Image

I exchanged <Imagevariants > of all Asteroids with <Image imageID="&rsStations1;" imageX="480" imageY="256" imageWidth="32" imageHeight="32" />

Thats a cargo crate.
The marked images are parts of anarchist settlement, about 160 pixels below the cargo crate.
I did some research on this and got a conclusion.
In mining.xml every asteroid with ore has 8 different imagevariants.
For normal asteroids, the images are one over another. (see worlds1.jpg)

While unsing a moded mining.xml file, I entered some systems. In this systems only one image was chosen. On systems I visited before modding, 8 different pictures appeared.
Somehow transcendence rembers that there where 8 different variants and continues to change the y value of the picture by the specified value ("imageHeight="). That way, the anarchist settlement-piece appeared.
It's no bug at all, but I dont know why and how transcendence remebers that there where 8 pics.

btw, about what I wanted to test by this mod (slight spoilers):
I wanted to know how the value after (intAsteroidOnMining ###) affects the mining. For most asteroids I needed to hit them with 1 or 2 plasma torch bursts, but some others also needed 5 to 10 before some ore appeared.
Last edited by Sheltem on Sun Aug 10, 2008 1:44 am, edited 1 time in total.
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

I wanted to know how the value after (intAsteroidOnMining ###) affects the mining.
Well, if you looked at the code you would already know that the number being passed in is called miningDifficulty in the function.

The key modifier is found when miningDifficulty is mulitplied by aMiningProbability, and then the result is divided by 100. There's a little mystery- I am not sure what the aMiningProbability is.

(aMiningProbability may be a value that changes from game to game, within a given limit)

The function rolls a random 1 to 100, and compares it to the result of the key modifier.

If there is Ore AND the random roll is less than or equal to the result of the key modifier, then you get ore.

Now- I am guessing that the lower the number the easier it is to get ore from the asteroid, if all the other conditions match.

Code: Select all

		<ImageVariants>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="0"   imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="64"  imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="128" imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="192" imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="256" imageWidth="64" imageHeight="64"/>

			<Image			imageID="&rsWorlds1;" imageX="128" imageY="320" imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="384" imageWidth="64" imageHeight="64"/>
			<Image			imageID="&rsWorlds1;" imageX="128" imageY="448" imageWidth="64" imageHeight="64"/>
		</ImageVariants>
I don't see anywhere that transcendence would "remember" the number of image variants. Show me the code for what you did and we may be able to puzzle out the why and how of it.
Post Reply