• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

[RPG] Secrets of the Code

Hehe - yes, I know what standards are, Creamsteak. :)

Actually, there are comments in the code, so that's a step up from some programs I've looked at.

Cheers!
 

log in or register to remove this ad

The standards vary based on the language, the Java standard is outlined on the Sun Website somewhere IIRC, and the normal standard for C is ISO-C, not sure if there's a PHP standard though. They are just basically ways of documenting and formatting code (and not using certain work arounds that make great big nightmares for others) so that its understandable universally (putting in jokes in your comments like this guy does for example is not usually conductive to anyone else getting it).
 

Most of the problems in the code I've seen come from the design of the database. He's called various 'bot fields different things than the player fields. If he hadn't done that it would have been SO MUCH SIMPLER!

Cheers!
 

Heh... What's the problem with this code?

function BotHealAttempt($P1,$bot,$battle){
...
if($P2['bot_rage']>99 || $P2['bot_rage']==100){

Could it be that $P2 isn't defined in the function? That'd be right! :)

Cheers!
 

Incidentally, I think the code is pretty clear - it's just not efficient and with some major problems in its design. :D

Cheers!
 

MerricB said:
Incidentally, I think the code is pretty clear - it's just not efficient and with some major problems in its design. :D

sounds like the 2000ed to the WotC crew. maybe they will release a patch/revision :lol:
 

Ten times worse, diaglo. Ten times worse.

I'm making some progress in my rewriting of the code, though.

Cheers!
 


MerricB said:
Ten times worse, diaglo. Ten times worse.

I'm making some progress in my rewriting of the code, though.

Cheers!
Don't spend too much time rewriting stuff - just concentrate on the changes we need to make. v2 of the RPG will be coming out soon, and this file will be completely replaced, no doubt, so I wouldn't want you to waste your effort.

Whatever changes are made now will probably need to be re-applied with v2.

Incidentally, v2 apparently adds a couple of new attributes (not sure what) plus removes the "random" attack option system to let you choose your attack.
 

Should be post the various bugs we might have seen?

- My job timer (I get paid weekly) increases every time I check it :\
- The bots' special attacks don't appear in the battle logs
- bots with 0 MP can still cast spells
- If you are at 100% XP and you use your special move, you'll change level, but your XP won't reset to 0 (IE I've had 104% XP)

AR
 

Into the Woods

Remove ads

Top