Jump to content

Dune II editor with 1.07 support


Nyerguds

Recommended Posts

Decay is handled in the top of the building handling function,

(candelay is timer controlled variable, and state 400 is set when a structure is placed on the map)

the reason 0 does damage is because the value is increased by 1 prior to calling the damage function

if( canDecay ) {

if( stateGet() & _objectState_400 ) {

word HP = dataGet()->HitPoints;

HP >>= 1;

if( _HitPoints  > HP ) {

word si = houseGet()->dataGet()->buildingDecay;

if( stateGet() & _objectState_400 )

++si;

objectDamageTake( si, 0 );

}

}

}

Link to comment
Share on other sites

Another question is whether such "self-repair" has any limits on the top side. You know, as in C&C, the units can be preset with their hp above 100% (doesn't work for structures though; I think it's because pre-placed structures behave a bit differently as they do not deteriorate and do not lose their hp even though usually they do not have concrete foundations). So even if this "self-repair" works, the results might be that the structures will grow beyond 100% hp.

Link to comment
Share on other sites

So even if this "self-repair" works, the results might be that the structures will grow beyond 100% hp.

Either this, or some script actually keeps buildings HP normalized. Also keep in mind that even though the 100% can be surpassed, after a long period of time if the limit for the HP is not so high (and I suppose it is a 2B value) it will flip to negative, moment in which I'm curious how the game will handle. :)

So in my honest opinion, healing buildings is a big no-no, unless the healing is normalized.

-Daelin

Link to comment
Share on other sites

Hmm... so should I make it into some sort of choices list, or just add the help and leave it at that?

I think you should give a general explanation that this is the amount of damage done to the player's buildings, and a side note that setting it to -1 means no damage. Everything else is optional, and thus does not necessarily have to be included in the help info.

Link to comment
Share on other sites

true. Well, implemented list from -1 to 9 (which equals 10 damage)

[edit]

Implemented a logic so I can allow list-based data types to show the bare value in the data column if the value in the exe is not present in the list. Normally, it shows "<Unknown>" instead, but for this data type it's worth showing the value :)

Also, if the value is higher than the highest list value, it'll scroll down to the last item on the list if you open it for editing, to get "as close as possible" to the value that's not in the list.

Link to comment
Share on other sites

I have some new information - at least, I think it's new - about unit weapon damage.

For bullet weapons (pistol, cannon) the explosion graphic that is used depends on the damage the weapon does.

Under 10 damage: pistol graphics.

10-39 damage: tank shot explosion.

40+ damage: devastator shot explosion [this also destroys spice and concrete!)

I found this out when I increased the Quad's damage to 10 and it started showing tank shell explosions when it hit something. Similarly, increasing the Combat Tank's damage to 40 also switched the graphic and explosion properties to that of a Devastator shell.

Another thing is that with small amounts of damage (infantry, trooper machine guns, trikes, quads), the damage positioning causes the damage to be halved, rounded DOWN. That's a pretty big difference. That's why I recommend changing the unit's damage to an even number. 5 damage is reduced to 2, but 6 damage is reduced to 3. First option reduces damage by 60%, the other by 50%. It's not much, but until someone fixes the bug...

On the other hand, I quite enjoy the mini-game of correct unit positioning... :P

Link to comment
Share on other sites

I think about the bullet size I had already mentioned it somewhere around here earlier when I was playing with the editor..... And it's normal to crush concrete easier. After all concrete has also a limited number of HP just as other buildings. :)

-Daelin

Link to comment
Share on other sites

I think about the bullet size I had already mentioned it somewhere around here earlier when I was playing with the editor..... And it's normal to crush concrete easier. After all concrete has also a limited number of HP just as other buildings. :)

-Daelin

I've never been able to destroy concrete using any number of quad/trike/trooper bullets or combat tank shots, until I increased the damage to 40+. I think it's a property of the explosion type that comes with that amount of damage.

Link to comment
Share on other sites

I've always thought that the ability to destroy concrete and spice comes from the "splash damage" that is a characteristic of each projectile. This could mean that the bullets and different-sized tank shells are in fact different projectiles, and not only different graphics. Would be nice if someone clarified this :)

Another thing is that with small amounts of damage (infantry, trooper machine guns, trikes, quads), the damage positioning causes the damage to be halved, rounded DOWN. That's a pretty big difference. That's why I recommend changing the unit's damage to an even number. 5 damage is reduced to 2, but 6 damage is reduced to 3. First option reduces damage by 60%, the other by 50%. It's not much, but until someone fixes the bug...

Do you guys think it's a bug or something else?

Link to comment
Share on other sites

There's only one "Bullet" in the units list though...

I know that. But since they have different graphics depending on attack points, this might mean they also get other differences, like a "splash damage" bonus, so they would be virtually different projectiles (or different versions of the same projectile if you want to put it that way).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.