# Few noob question (variables, doodas)

Status
Not open for further replies.

Level 17
1. why dont appear the texture if example if i use a doodas or tree model for unit model
example:
if i want use for paladin

2. what is the maximum value for integer/real, so what is the maximum number what i can store to variable (coz i see gold cant be more than 10^9)?

#### LordBacon

Level 2
trees as doodads dont work since the tree models dont have a texture. That is done in the destructible tab Art:replacable textures if you want a tree to have textures you propably have to make a custom model that comes with the desire texture. Atleast i think thats how it all works

#### Hashjie

Level 14
@LordBacon:

I guess you're referring to something similar to this?:

http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/new-trees-world-editor-150515/

Which is in fact possible...

1: A texture is blp or tga format, not mdl. A doodad can not be used as a unit model unless altered.
(As far as I've learned from personal experiences, the doodad models have textures applied to them within the model file. Which is impossible for units if I recall correctly.

2: I have absolutely no idea, but it might be 8192 digits long ^.^ (Not sure though)

Level 17
2: I have absolutely no idea, but it might be 8192 digits long ^.^ (Not sure though)

its so 8k digit long????

that could be enough but really can handle that huge numbers?

i use 2^x for counting the buffs, and i thought max value what i can hold is 2^29 so i thought cant use more than 29 buff coz maybe happen something overflow

#### Hashjie

Level 14
So that's 2147483648 and -2147483648 good to know, thanks!

Level 17
For integers the max value is (2^32)/2, for both negative and positive range.

maybe noob question but i ask,

so have this 2^31 limit but i can handle bigger numbers in calculation only i cant save it?
so this still work? s = Pow(2, 34) / 16 ?

#### Maker

Level 37
I'm pretty sure that is not possible. 2^34 causes an overflow. The calculation will produce a wrong result.

Last edited:

Level 17
I'm pretty sure that is not possible. 2^34 causes an overflow. The calculation will produce a wrong result.

ok so, example the 256 x 256 map is 256000 x 256000 if we use coordinate?

because if yes then if we want calculate distance between 2 point on map, and a unit is on top/left corner, b unit is bottom/right corner then distance calculation could cause problem , since 256000^2 is higher than 2^31.

or that 256 x 256 or 496 x 496 got 1:100 ratio when we use coordinates?

#### Maker

Level 37
A tile is 128x128. 256*128=36768.

Level 17
A tile is 128x128. 256*128=36768.

ah, so that 256 x 256 is 256 tile x 256 tile ty, so its mean in 496x496 could ahve problem with distance calculation (496*128*496*128) but 256 x 256 is safe

#### Maker

Level 37
Max map size is 480x480 tiles. Max coordinate values are thus 480*128/2=30720.

Max distance is Squareroot( (30720-(-30720))^2 + (30720-(-30720))^2 )
The max value that is used is (30720-(-30720))^2*2 = 7 549 747 200
That is much less than 2^32/2, so no problems there.

Level 17
Max map size is 480x480 tiles. Max coordinate values are thus 480*128/2=30720.

Max distance is Squareroot( (30720-(-30720))^2 + (30720-(-30720))^2 )
The max value that is used is (30720-(-30720))^2*2 = 7 549 747 200
That is much less than 2^32/2, so no problems there.

ups right, i calculated area, not distance when i made (480*128)^2 ty

Status
Not open for further replies.

Replies
0
Views
463
Replies
1
Views
1K
Replies
2
Views
736
Replies
8
Views
844
Replies
1
Views
277