Posts: 35
Threads: 3
Joined: Jun 2008
Ahhhh , i need someone to help and teach me to solve these problem
1. pop out damage figure (the injury number)
2. injury randomly between a set rank (like injury: 100-500)
3.critical hit (maybe 5% of effect0 have a critical hit)
4. different sparks for different effect
it`s okay if the methods are complicating or take time
is there anyone can teach me how to do these?
Thanks given by:
Posts: 1,018
Threads: 60
Joined: Mar 2008
1) I think you'll need a combination of DC + hex to achieve that. Drawing text in lf2 kinda sucks... (the background of the text will be black, will have a crappy font).
My way of doing it:
In all injury frames of characters you'll opoint some object, with action 999. You will detour from the "I lost hp" part of the exe, and save the amount of damage somewhere. You will then hook the opoint function - you will check if the oid is your object, and if the action is 999:
*) If it is, you will change the action value, to the amount of hp lost. Then continue to opoint it.
*) If it isn't , you will just opoint it normally.
Now in your object, each frame represents how much damage you took. So if you took 251 damage, on frame 251 you will do some stuff to make the number 251 appear (I don't DC, so I couldn't tell you how to do it).
The problem with that is, you can only display up to 399 damage.
2) Give injury 999 in the data file. Hook the games main loop, choose a random address to store the damage, every time the loop iterates you increase the variable by 1-5(up to you really). When it reaches 500, you reset it to 100. When the game goes to read the injury file:
*)if it is 999, replace 999 with the value of the variable
*)if it isn't just use it normally.
3) What do you mean by critical hit? Goes to different frames? Or does more damage?
4) That would be quite a pain. No one bothered to fully document how lf2 loads/uses its resources....
10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.
Thanks given by:
Posts: 746
Threads: 55
Joined: Apr 2008
05-13-2009, 02:24 PM
(This post was last modified: 05-13-2009, 03:00 PM by Som1Lse.)
Critical hit basically means extra damage. In RPG games like dragonfable and such it mostly doubles the value of damage dealt.
Edit: Wow genevrier I found just the same thing after posting this. Funny
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Thanks given by:
Posts: 101
Threads: 5
Joined: Mar 2009
3.critical hit (maybe 5% of effect0 have a critical hit)
When I see this request, I went to think about randomize all the damages in LF2...
(Well, I think this would be quite easy if you try to edit the itr stuff in the dll framework)
What I thought is, a formula! Something like
Real damage = (damage ^2 / defense point) * e ^ random factor (-1,1]
Thanks given by: