Nyerguds Posted October 28, 2009 Author Share Posted October 28, 2009 It's odd that 0 still does damage then. Quote Link to comment Share on other sites More sharing options...
segra Posted October 28, 2009 Share Posted October 28, 2009 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 ); } } } Quote Link to comment Share on other sites More sharing options...
Skrilax_CZ Posted October 28, 2009 Share Posted October 28, 2009 So using 0xFFFF (65535) would do the job ... Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted October 28, 2009 Share Posted October 28, 2009 So basically, if Decay is set to -2, the buildings will heal over time? ;D Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted October 28, 2009 Author Share Posted October 28, 2009 I guess that depends on whether the objectDamageTake function supports negative values. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted October 28, 2009 Share Posted October 28, 2009 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. Quote Link to comment Share on other sites More sharing options...
Daelin Posted October 28, 2009 Share Posted October 28, 2009 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 Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted October 28, 2009 Author Share Posted October 28, 2009 Hmm... so should I make it into some sort of choices list, or just add the help and leave it at that? Quote Link to comment Share on other sites More sharing options...
Daelin Posted October 28, 2009 Share Posted October 28, 2009 We should first test it and see what happens :)-Daelin Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted October 29, 2009 Share Posted October 29, 2009 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. Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted October 29, 2009 Author Share Posted October 29, 2009 Oh, I know, but I can also just make it a list of values, like for selecting construction options and such. A list of options including No decay, Decay factor 0, 1, 2, 3, etc. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted October 29, 2009 Share Posted October 29, 2009 Sounds like a good idea :) Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted October 29, 2009 Author Share Posted October 29, 2009 question then is, how far do I take it? What will bwe the maximum? :P Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted October 29, 2009 Share Posted October 29, 2009 I don't think going above 10 is reasonable. Maybe even 5. If someone wants more, it's always possible in hex-editing mode, right? Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted October 29, 2009 Author Share Posted October 29, 2009 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. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted November 2, 2009 Share Posted November 2, 2009 Jordos asked a question about Trooper rockets in the Dune II forum. Can anyone remind me if the code related to those was found? The modifiable values for the Troopers indicate a bullet weapon, although max firing range is rather for the rocket weapon. Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted November 10, 2009 Author Share Posted November 10, 2009 hey dude, just realized i gave you the wrong bit for 'Full Scripts'its actually Unknown 6 Bit4, im not sure what Bit3 isAbout that full scripts thing... can you actually explain what it does? I never really understood it... Quote Link to comment Share on other sites More sharing options...
Will Posted November 13, 2009 Share Posted November 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
Daelin Posted November 13, 2009 Share Posted November 13, 2009 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 Quote Link to comment Share on other sites More sharing options...
Will Posted November 13, 2009 Share Posted November 13, 2009 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. :)-DaelinI'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. Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted November 14, 2009 Share Posted November 14, 2009 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? Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted November 14, 2009 Author Share Posted November 14, 2009 There's only one "Bullet" in the units list though... while there are 4 types of rockets (though one of these is the Gas Rocket). Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted November 14, 2009 Share Posted November 14, 2009 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). Quote Link to comment Share on other sites More sharing options...
Nyerguds Posted November 14, 2009 Author Share Posted November 14, 2009 Heh, looking at hat we know so far, that looks like another bunch of code exceptions :P Quote Link to comment Share on other sites More sharing options...
MrFlibble Posted November 14, 2009 Share Posted November 14, 2009 Indeed. Exceptions within exceptions within exceptions... ;) ;D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.