|
Nightborn
|
 |
« on: August 28, 2008, 08:32:55 am » |
|
Well, I implemented a healthbar for creatures into the core (it's a PITA to do so elsewhere). However, this screwed up PVP and travelfights - they lead to "miss - miss" attack/defend ...means an endless fight. *sigh* The rolldamage() and the entire battle system is pretty bad code. No encapsulation, largely global vars anybody can shred. I have NO clue where it broke - it looks as *I* encapsulated my new stuff into a fightbar class. (until I re-do the entire battle system) I made a setting to have "only text hitpoints", "only bar hitpoints" and "both" in the grotto. Once I have some time I see where the error is - but I am almost tempted to trash the entire battle system, make a copy+paste class rewrite which is CLEAN finally, and then go on. But it's a hell of a lot work... and I would re-do it later on anyway. As for healthbars, exp bars... I might be tempted to make it core if we have more bars around. It can be done better with DIVs like I did than with tables... and I have a static class who can handle it  from a central position. EDIT: ok, the global stuff got fixed and now it is working, I'll update the archive soon.
|
|
|
|
« Last Edit: August 30, 2008, 07:45:41 pm by Nightborn »
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Alchemion
Guest
|
 |
« Reply #1 on: August 31, 2008, 03:26:38 pm » |
|
There are a lot of bars around... beside the health bar and experience bar there is more with the displaycp.php module (the drunkness bar), there is more also with the mission resting time and the pvp attack resting time bars I have finished for the lodge... and there still may be more implemented...
|
|
|
|
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #2 on: August 31, 2008, 03:53:31 pm » |
|
those are modules. in 1.2.0 you can simply require the lib/battle-functions.php instantiate the fightbar class and then have your own bar anywhere  it's a prototype currently, may be customized later on at leisure.
|
|
|
|
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Iori
Guest
|
 |
« Reply #3 on: September 01, 2008, 03:56:21 am » |
|
Why would you need HP bars in rolldamage()?
HP is displayed in the show_enemies() function in lib/extended-battle.php. It makes sense to implement it in there.
As a side note, rolldamage() should be at least 2 separate functions - you'll cut down on about 50% inefficiency that way.
|
|
|
|
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #4 on: September 01, 2008, 08:14:11 am » |
|
I did not display bars in rolldamage() Oo who'd do such a thing.
As you said, I do it in show_enemies().
I agree on your sidenote - but I will most most likely write the entire battle system from scratch again in OOP. The code is ugly enough to scare children. Variables like $unsetme and 3 lines of global stuff - BAD.
Hence I did not bother to make those changes as it works currently. I have, however, modified the rolldamage() to be rolldamage(&badguy). References work, so one less global variable. (I did this while debugging on a test run)
|
|
|
|
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Alchemion
Guest
|
 |
« Reply #5 on: September 07, 2008, 10:06:16 am » |
|
what are you saying about the enemy health bar ?... you say that this could be shown in battle ?...
how is that possible, I mean, what is the code or what variable should I "turn on" to test this functionality of the +nb engine ?
Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #6 on: September 07, 2008, 12:34:16 pm » |
|
yes.
see attachment.
I will do an "in-between" release, named 1.2.0.0 possibly, and then settle for now.
no newer bugs (except ones already present from before +nb) were caught, however the caching is currently expiring very slowly and I am yet to find out why Oo
the fightbar is a class in the lib directory you can call from anywhere and make your own bars available in the game.
fightbar will be a child class of the bar class, possibly. This is not the final form, though =)
|
|
|
|
« Last Edit: September 07, 2008, 12:37:18 pm by Nightborn »
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Alchemion
Guest
|
 |
« Reply #7 on: September 08, 2008, 10:33:32 am » |
|
I have downloaded the latest 1.2.0 +nb core, but I cannot find the fightbar class you say in the lib or any other directory...
could you, please, attach here the file you are talking about, also with the lib or core referenced and modified file, in order for the effect to work in battles.
thank you very much.
|
|
|
|
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #8 on: September 08, 2008, 06:31:50 pm » |
|
EDIT: ok, the global stuff got fixed and now it is working, I'll update the archive soon.
I will do an "in-between" release, named 1.2.0.0 possibly, and then settle for now. I have not put that into the snapshot - I am waiting if bug reports come in and if not put that into core. Edit: no bug reports, which means I deem it okay. Put into the dev-snapshot of 1.2.0. Release pending, I'll do a 1.2.1 afterwards.
|
|
|
|
« Last Edit: September 09, 2008, 07:46:50 am by Nightborn »
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Alchemion
Guest
|
 |
« Reply #9 on: September 15, 2008, 10:23:05 am » |
|
I have downloaded the new snapshot of the 1.2.0 +nb core files.
How do I "activate" the fightbar in battles, and where do I place the requiring code ?....
Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #10 on: September 15, 2008, 11:51:24 am » |
|
what code?
there is a game setting, as explained in the CHANGELOG.txt
|
|
|
|
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|
Alchemion
Guest
|
 |
« Reply #11 on: September 15, 2008, 01:20:00 pm » |
|
Attached there is the changelog... no sign of a bar or creature hitpoint during battles... Before posting the previous post, I have also checked the standard game settings and no sign of battle hitpoint bars either... Yet, I think so...  Edit: i have rechecked the settings... more carefully... and the setting was found... yeah... very nice feature... thank you very much for sharing it. keep up the good work!
|
|
|
|
« Last Edit: September 15, 2008, 08:50:09 pm by Alchemion »
|
Logged
|
|
|
|
|
Nightborn
|
 |
« Reply #12 on: September 16, 2008, 08:26:28 am » |
|
Thanks, old CHANGELOG ... updated now.
|
|
|
|
|
Logged
|
It should be fixed, but it won't be easy and it won't be fast. If you want to help - wonderful. But keep in mind that it will take months of wading through the ugliest code we have in the tree. If you've got a weak stomach - stay out. I've been there and it's not a nice place.
- Al Viro
|
|
|
|