Is there any good way of making fights?
ramtha
01 Dec 2005, 17:41I have been trying to think of a way to create fights, and so far I'm comming up blank. Aside from that, I also want to know wether it is possible for a object, such as person to preform a random action, or if they are stuck with what you tell them.
Elexxorine
06 Dec 2005, 13:34i'm currently working on an rpg system which includes a fighting matrix, the first version should be done by the end of the week.
ramtha
11 Dec 2005, 23:13sweet. Is there anyway I could get ahold of that?
Elexxorine
12 Dec 2005, 11:16actually i'm having a bit of a problem with it at the moment, tron's having a look at it as we speak....
Gordex
12 Jan 2006, 23:23do you want objects fighting each other, or the player fighting objects, or what?
ramtha
14 Jan 2006, 02:08Either or..... both would be excelent, but i can deal with just the player fighting objects
Overcat
15 Jan 2006, 12:24I too would be interested in the different approaches writers/coders have taken in regards to combat. Would it seem fair if I asserted the existence of two conflict resolution poles, namely narrativist and gamist? (These terms were stolen from discussions and articles at http://www.indie-rpgs.com). While a narrativist approach would resolve conflict based on the structure and movement of the plot, a gamist approach would demand a systematic representation of variables such as Strength, Speed, Skill, Weapon Type, Health, etc. The gamist would articulate the states of combat with messages such as "You swing and miss", or "You hit for 14 hp of damage". The narrativist would articulate such states differently: "You lunge forward, but Carlos sidesteps quickly away", and "You feint to the left, then flick to the right, catching Carlos across his cheek. A thin red line bursts into color below his eye and, shocked, he stumbles backwards into a pile of books".
While a gamist checks for system verification to resolve the combat, a narrativist checks for plot verification. That is, a gamist compares statistics and/or random numbers to ascertain an outcome, while a narrativist compares the actions of the player to ascertain an outcome - IE, did they find the sword? did they get some rudimentary training? did they practice? did they enrage Carlos? have they spoken to Helena about Carlos' fighting style?
I suspect a median between these two poles would be more greatly desired.
While a gamist checks for system verification to resolve the combat, a narrativist checks for plot verification. That is, a gamist compares statistics and/or random numbers to ascertain an outcome, while a narrativist compares the actions of the player to ascertain an outcome - IE, did they find the sword? did they get some rudimentary training? did they practice? did they enrage Carlos? have they spoken to Helena about Carlos' fighting style?
I suspect a median between these two poles would be more greatly desired.
lyteside
15 Jan 2006, 22:40I totally agree, overcat. It would be awesome to combine stats and random environment/mob modifyers along with strategic input from the gamer as to "how" they want to attack. and then have the battles seem more detailed and involved. of course, the more input required from the player, the more "turn-based" the battle may become. That's probably why a good balance should be found between the two. Gordex and I have written a code that seems to work well for the "gamist" side of things, and resembles closely to MUD type battles, if anyone is interested. feel free to steal the code and use it how you want...you'll have to plug in and add your own variables to make this work, since this is only a snippet:
here is the command <attack #@object#> that will start the pwning process:
'************************************************************************************************
'************************************************************************************************
'********************************** PLAYER ATTACK ***********************************************
'************************************************************************************************
'************************************************************************************************
define procedure <playerattackproc>
set numeric <attackpower; %STR% / 2>
set numeric <damage; %attackpower% + $rand(1;10)$>
set numeric <attackhit; %DEX% / 2>
set numeric <attackhit; %attackhit% + $rand(1;20)$>
' set numeric <attackhit; %attackhit% - $rand(1;10)$>
set interval <playerattack; %attackspeed%>
set numeric <battle; 1>
set numeric <ARTDAMAGE; %INT% + %CHR%>
set numeric <ARTDAMAGE; %ARTDAMAGE% / 2>
set numeric <ARTDAMAGE; %ARTDAMAGE% + $rand(%ARTDAMAGELOW%;%ARTDAMAGEHIGH%)$>
if (%HP% <=0) then {
do <turnoffalltimers>
}
if not here <#lastenemy#> then do <createexits>
'1: Check to see if mob is here.
if here <#lastenemy#> then {
' 2: If you don't have art, then attack with this code.
if (%ARTONOFF% = 0) and (%EHP% > 0) then {
' 3: Check to see if you hit the mob or not.
if ( %attackhit% > #(lastenemy):armor# ) or ($rand(1;20)$ = 20) then {
' 10: Do this stuff for damage to armor and such
if (%enemytempARMOR% > 0) and ($rand(1;#(lastenemy):armor#)$ >= 10) then {
set numeric <damage; %damage% / 2>
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <attack |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
if ($rand(1;20)$ = 20) then {
set numeric <damage; %damage% * 2>
msg <with a |i|cymighty blow|cb|xi for |cr|b%damage%|xb|cb points of damage!>}
else msg <for |cr|b%damage%|xb|cb points of damage.>
dec <EHP; %damage%>
dec <enemytempARMOR; %damage%>
set numeric <deflect; $rand(1;3)$>
if (%deflect% = 1) then {
if (#(lastenemy):article# = it) then msg <Its tough armour deflects the rest.>
else msg <$capfirst(#(lastenemy):article#)$ armour deflects the rest.>
}
if (%deflect% = 2) then {
msg <You are weakening |xn>
if (#(lastenemy):article# = it) then msg <its defenses.|xi|cb>
if (#(lastenemy):article# = him) then msg <his defenses.|xi|cb>
if (#(lastenemy):article# = her) then msg <her defenses.|xi|cb>
}
if ( %enemytempARMOR% <= 0) then {
msg <|i|cyYou have broken through |xn>
if (#(lastenemy):article# = it) then msg <its defenses!|xi|cb>
if (#(lastenemy):article# = him) then msg <his defenses!|xi|cb>
if (#(lastenemy):article# = her) then msg <her defenses!|xi|cb>
}
}
else {
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <attack |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
if ($rand(1;20)$ >= 19) then {
set numeric <damage; %damage% * 2>
msg <with a |i|cymighty blow|cb|xi for |cr|b%damage%|xb|cb points of damage!>}
else msg <for |cr|b%damage%|xb|cb points of damage.>
dec <EHP; %damage%>
}
' 10: end----------
if (%EHP% > 0) then do <battlehps>
' 4: If weapon has double damage, run this.
if ( %doubledamage% > 1) and (%EHP% > 0) then {
set numeric <damage; $rand(3;13)$>
msg <|b|cgYour|cb|xb weapon deals out an extra |cr|b%damage%|xb|cb damage!>
dec <EHP; %damage%>
' if (%EHP% > 0) then do <battlehps>
} ' 4: end ---------------
' 5: If you can [ knock ] enemy down, run this.
if ( %knock% > 0 ) and ($rand(1;20)$ > 18) then {
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <|i|cyknock|cb|xi your opponent down and |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <loses a turn!>
set numeric <e_loseturn; 1>
} ' 5: end ---------------
5.5: If you can [ disarm ] enemy, run this.
if ( %disarm% > 0 ) and ($rand(1;20)$ > 18) then {
if not flag <disarm> then {
do <disarm>
set string <disarmed_weapon; #(lastenemy):weapon#>
set string <disarmed_mob; $getobjectname(#lastenemy#)$>
if (#(lastenemy):article# = her) then property <$getobjectname(#lastenemy#)$; weapon=her fists>
if (#(lastenemy):article# = him) then property <$getobjectname(#lastenemy#)$; weapon=his fists>
if (#(lastenemy):article# = it) then property <$getobjectname(#lastenemy#)$; weapon=its fists>
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <|i|cydisarm|cb|xi your opponent!>
do <bounty>}
flag on <disarm>
set numeric <e_disarm; 1>
}
' 6: If you successfully knocked your opponent out, run this.
if (%e_loseturn%=0) then timeron <enemyattack>
else { timeroff <enemyattack>
set numeric <e_loseturn; 0>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <fumbles around, trying to regain composure.>
} ' 6: end---------------
} ' 3: cont.------ Run this if you missed the mob.!!!!!!!!!!!!
else { set numeric <damage; $rand(3;13)$>
dec <wieldability; $rand(0;5)$>
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <attack |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <but miss!>
' 7: If you missed and weapon is unsafe (i.e. whip), run this
if (%unsafe% > 0) and ($rand(1;%wieldability%)$ > %attackhit%) then {
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <end up hurting yourself for |cr|b%damage%|xb|cb damage!>
dec <HP; %damage%>
} ' 7: end---------------
timeron <enemyattack>
} ' 3: end---------------
} ' 2: end---------------
' 2: If you have "the art" (spiritual attack), attack with this code.
if (%ARTONOFF% = 1) and (%ART% > 0) and (%EHP% > 0) then {
set numeric <attackhit; %attackhit% + %ART%)>
if ( %attackhit% > #(lastenemy):armor# ) then {
set string <ARTSTR[1]; Void>
set string <ARTSTR[2]; Gravity>
set string <ARTSTR[3]; Annihilation>
set string <ARTSTR[4]; Suffering>
set string <ARTSTR[5]; Despair>
set string <ARTSTR[6]; Horror>
set string <ARTSTR[7]; Disease>
set string <ARTSTR[8]; Chaos>
set string <ARTSTR[9]; Spirit>
set string <ARTSTR[10]; Time>
set string <ARTSTR[11]; Anguish>
set numeric <ARTNUM; $rand(1;11)$>
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <attack |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <using |b|crthe art of #ARTSTR[ARTNUM]#!|cb|xb for |cr|b%ARTDAMAGE%|xb|cb points of damage.>
set numeric <ARTONOFF; 0>
timeron <arttimer>
dec <EHP; %ARTDAMAGE%>
' if (%EHP% > 0) then do <battlehps>
}
else {
foreground <&H779999>
msg <You |xn>
foreground <white>
msg <attack |xn>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <the |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <using your |b|crArt|cb|xb but fail!>}
if (%EHP% > 0) then timeron <enemyattack>
else { do <turnoffattacktimers>
set numeric <battle; 0>
if (%COMBO% > 0) then set numeric <COMBOONOFF; 1>
if (%ART% > 0) then set numeric <ARTONOFF; 1>
}
} ' 2: end---------------
}
else { do <turnoffattacktimers>
if (%COMBO% > 0) then set numeric <COMBOONOFF; 1>
if (%ART% > 0) then set numeric <ARTONOFF; 1>
set numeric <battle; 0>
} '1: end---------------
set numeric <ehp10; %ehpmax% / 10>
set numeric <ehp80; %ehp10% * 8>
set numeric <ehpdiff; %ehpmax% - %EHP%>
if (%ehp80% < %ehpdiff%) and (%EHP > 0 ) then do <enemyhps>
'8: Training bot stuff. not really a part of the stuff above.
if (#lastenemy# = trainingbot) and (%hp75% < %hpdiff%) and (%HP% <> %HPMAX%) and (%EHP% > 0) then {
msg <|cgGood show! |b|cgYou|cg|xb should take a rest now.|cb>
do <turnoffattacktimers>
if (%COMBO% > 0) then set numeric <COMBOONOFF; 1>
if (%ART% > 0) then set numeric <ARTONOFF; 1>
set numeric <battle; 0>
} '8: end---------------
end define
'************************************************************************************************
'************************************************************************************************
'********************************** ENEMY ATTACK ************************************************
'************************************************************************************************
'************************************************************************************************
define procedure <enemyattackproc>
set numeric <tohit; %DEX% / 2>
set numeric <tohit; %tohit% + $rand(1;20)$>
set numeric <enemyattempt; #(lastenemy):dexterity# / 2>
set numeric <enemyattempt; #(lastenemy):dexterity# + $rand(1;20)$>
' set numeric <enemyattempt; %enemyattempt% - $rand(1;10)$>
set numeric <e_damage; #(lastenemy):strength# + $rand(1;10)$>
if (%parry% = 0) then set numeric <enemyattempt; %enemyattempt% - $rand(1;7)$>
if not (#lastenemy# = trainingbot) then {
set numeric <taunting; $rand(1;4)$>
' if (%taunting% = 1) then msg <#(lastenemy):taunt#>
' if (%taunting% = 2) then msg <#(lastenemy):taunt2#>
' if (%taunting% = 3) then msg <#(lastenemy):taunt3#>
' if (%taunting% = 4) then msg <#(lastenemy):taunt4#>
}
set interval <enemyattack; #(lastenemy):speed#>
if (%EHP% < 1) then {
do <turnoffattacktimers>
if (%COMBO% > 0) then set numeric <COMBOONOFF; 1>
if (%ART% > 0) then set numeric <ARTONOFF; 1>
}
If not here <#lastenemy#> then {
do <createexits>
do <turnoffattacktimers>
if (%COMBO% > 0) then set numeric <COMBOONOFF; 1>
if (%ART% > 0) then set numeric <ARTONOFF; 1>
}
set numeric <firstenemyattempt; $rand(1;20)$>
if (%battle% = 1) then {
'1: Check to see if you the enemy DOESN'T roll a 1.
if ( %firstenemyattempt% > 1 ) then {
' 2: Check to see if the mob hits naturally, or on a random natural 20.
if ( %enemyattempt% > %DEX%) or ($rand(1;20)$ = 20) then {
if (%parry% = 1) then set <parryrandom; $rand(1;20)$ >
if (%riposte% = 1) and (%parryrandom% > 10) and (%parry% = 1) then set <riposterandom; $rand(1;30)$>
do <badassmobs>
' 3: If you can riposte, and you rolled to get the riposte, run this.
if (%riposterandom% > 20) and (%tohit% > #(lastenemy):armor#) and (%tohit% > #(lastenemy):dexterity#) and (%riposte% = 1) and (%parry% = 1) and (%EHP% > 0) then {
set numeric <e_damage; %e_damage% / 2>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon#, but you |cyriposte|cb the attack doing |cr|b%e_damage%|xb|cb damage!>
dec <EHP; %e_damage%>
}
else {
' 4: If riposte failed, and you can parry then try to parry instead.
if (%parryrandom% > 10) and (%parry% = 1) and (%tohit% > #(lastenemy):dexterity#) then {
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon#, but you |cyparry|cb the attack!>
}
else {
' 5: If you failed to parry, then have the enemy do damage!
if (#lastenemy# = trainingbot) then {set numeric <e_damage; %HPMAX% / 10>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon# for |cr|b%e_damage%|xb|cb points of damage.>
dec <HP; %e_damage%>}
else {
' 6: Do this stuff for damage to armor and such
if (%tempARMOR% > 0) then {
set numeric <e_damage; %e_damage% / 2>
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else msg <The |b$displayname(#lastenemy#)$|xb |xn>
foreground <white>
msg <attacks you with #(lastenemy):weapon# for |cr|b%e_damage%|xb|cb points of damage, while your armour |cyabsorbs|cb some of the blow.>
dec <HP; %e_damage%>
dec <tempARMOR; %e_damage%>
if ( %tempARMOR% <= 0) then {
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
msg <|i|cyhas broken through your armour!|cb|xi>
foreground <&H00FFFF>
pause <100>
foreground <white>
pause <50>
foreground <&H00FFFF>
pause <100>
foreground <white>
}
}
else {
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <The |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon# for |cr|b%e_damage%|xb|cb points of damage.>
dec <HP; %e_damage%>
}
' 6: end----------
}
' 5: end----------
set numeric <hp10; %HPMAX% / 10>
set numeric <hp90; %hp10% * 9>
set numeric <hp80; %hp10% * 8>
set numeric <hpdiff; %HPMAX% - %HP%>
if (%hp80% < %hpdiff%) and (%HP% > 0) then {
msg <|b|cr|iYou are close to death!|xi|cb|xb>
foreground <&H0000FF>
pause <100>
foreground <white>
pause <50>
foreground <&H0000FF>
pause <100>
foreground <white>
}
if (%EHP% > 0) then do <battlehps>
}
' 4: end----------
}
' 3: end----------
}
' 2: end / else----------
else {
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <$capfirst(#(lastenemy):prefix#)$ |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon# but misses!>
}
' 2: end-----------
}
'1: end / else-----------
else {
foreground <&H2266F2>
if ($lengthof(#(lastenemy):prefix#)$ = 0) then msg <|b$displayname(#lastenemy#)$|xb |xn>
else {msg <$capfirst(#(lastenemy):prefix#)$ |b$displayname(#lastenemy#)$|xb |xn>}
foreground <white>
msg <attacks you with #(lastenemy):weapon# but misses horribly!>
} '1: end-----------
}
end define
'************************************************************************************************
'************************************************************************************************
'********************************** COMBAT TIMERS ***********************************************
'************************************************************************************************
'************************************************************************************************
define timer <arttimer>
interval <10>
action {if (%ART% > 0) and (%ARTONOFF% = 0) then {
set numeric <ARTONOFF; 1>
timeroff <arttimer>}
} else timeroff <arttimer>
disabled
end define
define timer <combotimer>
interval <15>
action {if (%COMBO% > 0) and (%COMBOONOFF% = 0) then {
set numeric <COMBOONOFF; 1>
timeroff <combotimer>
exec <combo> }
}
disabled
end define
'************************************************************************************************
'********************************** PLAYER ATTACK ***********************************************
'************************************************************************************************
define timer <playerattack>
interval <1>
action {
if (%EHP% > 0) and (%HP% > 0) then do <playerattackproc>
else {
do <nothing>
set numeric <battle; 0>
timeroff <playerattack>
timeroff <enemyattack>
}
}
disabled
end define
'************************************************************************************************
'********************************** ENEMY ATTACK ************************************************
'************************************************************************************************
define timer <enemyattack>
interval <2>
action {
if (%EHP% > 0) and (%HP% > 0) then {
do <enemyattackproc>
if flag <arrest> and (%hp60% < %hpdiff%) and (%HP% > 0) then {
msg <You are overtaken and arrested.>
do <turnoffalltimers>
goto <Morulan Information Center Lobby>
}
}
else {
do <lastdyingmove>
do <nothing>
set numeric <battle; 0>
timeroff <enemyattack>
timeroff <playerattack>
}
} 'END ACTION
disabled
end define
here is the command <attack #@object#> that will start the pwning process:
' *************** ATTACK PHASE *********************
command <attack #@object#> {
if ( #(object):combat# > 0 ) then {
set numeric <espeed; 10>
' *************** TURN OFF TIMERS ******************
' timeroff your relavent timers
' *************** SET FIGHTING VARIABLES ************
' most of this sets up the enemies hitpoints and strength and such.
set numeric <enemyattempt; #(object):dexterity#>
set numeric <enemytempARMOR; #(object):armor#>
set numeric <tempARMOR; %ARM%>
set numeric <attackspeed; 20 / %DEX% >
set interval <playerattack; 2>
set numeric <espeed; #(object):speed#>
' set numeric <attackpower; %STR% / 2>
' set numeric <attackhit; %DEX%>
do <enemylifeproc>
timeron <playerattack>
do <getexits>
'this procedure destroyed the exits in the room temporarily
'while you fought, so you had to type a specific command to
'try and escape.
do <removeexits>
}
else msg <You can't attack that.>}
end define
ramtha
16 Jan 2006, 05:52Holy crap, I think my eyes are about to boil out through the sockets.... Well I supposed this would be as a good timeas any to ask how exactaly you go about pulling in all that coding....
paul_one
16 Jan 2006, 12:43Gamist..
Do you mean that you would have to type "attack left ear" etc, and have a battle along that way. How about multiple choice - ie:
"You miss the swing and Sir Baldrick takes this opportunity to hit you off balance.
You fall to one knee, grasping your blade tightly.
What shall you do?
1. Slash at his left arm,
2. Swing wildly,
3. Regain your balance,
4. Lunge forewards with your sword,
"
And I take it the Gamist approach is a turn-ish based around basically a "final fantasy" based approach.
I think both are fairly possible - and indeed quite good for gameplay. I will be looking into both approaches as special battles will be welcomes as the first type - while menial battles are more of a 'gamist' approach as you can gain many skills, items, cheats, and method's.
Do you mean that you would have to type "attack left ear" etc, and have a battle along that way. How about multiple choice - ie:
"You miss the swing and Sir Baldrick takes this opportunity to hit you off balance.
You fall to one knee, grasping your blade tightly.
What shall you do?
1. Slash at his left arm,
2. Swing wildly,
3. Regain your balance,
4. Lunge forewards with your sword,
"
And I take it the Gamist approach is a turn-ish based around basically a "final fantasy" based approach.
I think both are fairly possible - and indeed quite good for gameplay. I will be looking into both approaches as special battles will be welcomes as the first type - while menial battles are more of a 'gamist' approach as you can gain many skills, items, cheats, and method's.
Overcat
18 Jan 2006, 23:12By gamist I mean that the information being passed to and received from the player is overtly systematic and numerically resplendant. It depends on "game" concepts such as Attributes. By narrativist I mean that the same information is literary and verbally ornate. It depends on "narration" concepts such as Plot. This paragraph attempts the latter.
Gamist is information(systematic, 8-21). Narrativist is information(literary, the crush and the kill). This paragraph is the former.
Not that verbosity is a universal differentiation, but you get the point.
Gamist = You hit for 12 points of damage.
Narrativist = You flick your wrist, sending the dagger towards INSERT DRAMATIC ENEMY NAME HERE. His life ends with a gurgle-choke, just as the sun breaks through a concert of dissipating clouds.
While the gamist method applied some sort of detailed, comparative, mathematical mechanics to generate the preceding outcome, the narrativist method may have only resorted to a flag or two.
Gamist is information(systematic, 8-21). Narrativist is information(literary, the crush and the kill). This paragraph is the former.
Not that verbosity is a universal differentiation, but you get the point.
Gamist = You hit for 12 points of damage.
Narrativist = You flick your wrist, sending the dagger towards INSERT DRAMATIC ENEMY NAME HERE. His life ends with a gurgle-choke, just as the sun breaks through a concert of dissipating clouds.
While the gamist method applied some sort of detailed, comparative, mathematical mechanics to generate the preceding outcome, the narrativist method may have only resorted to a flag or two.
paul_one
19 Jan 2006, 12:26I do like some of the narrative in those sorts of stories.
I find Legond Of the Green Dragon has some nice smarmy lines.
- But it is also very gamist.
I still think that it should be a mixture of the two - since having it narrativistic will just lead to one thing: instead of interaction you get story.
Having it both gamist (numbers) AND narrativistic (dynamic descriptions of actions) then you get the good from both worlds.
I find Legond Of the Green Dragon has some nice smarmy lines.
- But it is also very gamist.
I still think that it should be a mixture of the two - since having it narrativistic will just lead to one thing: instead of interaction you get story.
Having it both gamist (numbers) AND narrativistic (dynamic descriptions of actions) then you get the good from both worlds.
lyteside
19 Jan 2006, 16:35absolutely. gotta agree with that.
Overcat
19 Jan 2006, 22:40Agreed on thrice.
Elexxorine
20 Jan 2006, 13:56going back to the original topic of this thread: has anyone created a good fighting code yet? i have an half finished one and it could take i bit of work getting it fixed, and i'll need one soon for neverquest. so anyone got one?
lyteside
20 Jan 2006, 15:38elexxorine, how do you want your fights to happen? are they gonna be turn based, time-based, or what?
Elexxorine
24 Jan 2006, 11:18i'm not sure. what would be best as it's multiplayer?
lyteside
24 Jan 2006, 15:50for multi-player, it's harder to make things turn based, but it could be done. A third player would just have to "check into" a fight and wait for his/her turn to come around.
I would suggest the time-based, though. Where you type "attack -player-" and a script starts running every x seconds to let you attack and defend, where x is related to your speed or dexterity or whatever. Also, the player whom you are attacking will auto respond and start running his/her built in fihgting scripts. Very much like a mud, i suppose, but hey, that's why they do fights like that in the muds.
I would suggest the time-based, though. Where you type "attack -player-" and a script starts running every x seconds to let you attack and defend, where x is related to your speed or dexterity or whatever. Also, the player whom you are attacking will auto respond and start running his/her built in fihgting scripts. Very much like a mud, i suppose, but hey, that's why they do fights like that in the muds.

paul_one
24 Jan 2006, 16:33I agree a bit with lyteside.
I personally am going to have my fight library using stats-based-turn-battling. Where the speed/etc is measured and, although attacks are based in 'turns', those turns are based on speed.
So if you have a speed of say 4, and the opponent 2, then you get 2 turns to every 1 your enemy get's (or something like that).
I suppose you could even have it so if it's something like 3/2, you can have 1, then opponent, then you, then opponent, then you twice. That's roughly where I want to go to start off.
I think ITID did that time-based code a while ago, although he didn't get extremely far with it. He did get balance/attack/defense/movement and stuff running in QuestNet though!
I personally am going to have my fight library using stats-based-turn-battling. Where the speed/etc is measured and, although attacks are based in 'turns', those turns are based on speed.
So if you have a speed of say 4, and the opponent 2, then you get 2 turns to every 1 your enemy get's (or something like that).
I suppose you could even have it so if it's something like 3/2, you can have 1, then opponent, then you, then opponent, then you twice. That's roughly where I want to go to start off.
I think ITID did that time-based code a while ago, although he didn't get extremely far with it. He did get balance/attack/defense/movement and stuff running in QuestNet though!
Elexxorine
25 Jan 2006, 09:09hmm.... other people interupting a fight can be a problem, any ideas how to stop that? and maybe add a 'group' system so you can fight together. that would be neat. anyway i think i'm going to go for something like the guy who made reading presented gallivant (rpg) where you add to a counter and when it gets to a certain number it's your turn. that would be simplest.
another problem that's concerning me is status conditions, eg: paralye, burnt, alseep, etc. that effect wheather you can attack, defend, etc... my current battle code is riddled with if's checking each status condition in turn... is there a simpler way to do this?
another problem that's concerning me is status conditions, eg: paralye, burnt, alseep, etc. that effect wheather you can attack, defend, etc... my current battle code is riddled with if's checking each status condition in turn... is there a simpler way to do this?
lyteside
25 Jan 2006, 15:34yeah, that's a great question. some of my checks had to be ifs during the battle, but there are some things i could get away with. for instance, in my game, you can drink alcohol to change your stats (charisma and strength go up, intelligence and dexterity go down), but it doesn't "check" to see if you are drunk. rather it only temporarily affects the stats when you drink, and then a timer runs to make you slowly go back to normal. I'm sure you could use this code for things to temporarily change speed of attack, or change of stats because of a spell that was done to you, etc.
I made some sample code for ya. Let's say the enemy puts a "drunk" spell on you. lol. here it goes:
these will be some variables you'll need to put in to make it work.
this is the sorcerer dude i made that will perform a drunkenness spell on ya during combat.
here's the procedure to run during the combat whenever you want him to perform the spell (or the player, i suppose)
and here's the timer that slowly gets your stats back:
I made some sample code for ya. Let's say the enemy puts a "drunk" spell on you. lol. here it goes:
these will be some variables you'll need to put in to make it work.
set numeric <CHR; 5>
set numeric <INT; 5>
set numeric <DEX; 5>
set numeric <STR; 5>
set numeric <drunkenness; 0>
set string <drunkLEVEL; sober>
' *********** and when performing the attack command, set the enemy to the "enemy string" **********
set string <enemy; $getobjectname(#quest.lastobject#)$>
this is the sorcerer dude i made that will perform a drunkenness spell on ya during combat.
define object <Sorcerer>
suffix <of Drunkenness>
' *********************fight properties***********************
properties <weapon=his spellbook; drunk_spell=4; combat=1; intelligence=17; aggro=2; hitpoints=70; dexterity=35; speed=1; strength=12; charisma=23; armor=16; exp=100; prefix=; taunt=; taunt2=-hiccup-; taunt3="Get drunk!"; taunt4=; align=4>
' ******************* REGULAR *******************************
prefix <a>
alt <Sorcerer; Drunkenness; Sorcerer of Drunkenness; man; wizzard; enemy>
look <It's a sorcerer that wants to see you drunk. You want to see him dead.>
speak <He hiccups at you.>
examine <He's carrying a spellbook of drunkenness.>
article <him>
gender <he>
end define
here's the procedure to run during the combat whenever you want him to perform the spell (or the player, i suppose)
define procedure <drunk spell>
msg <The Sorcerer casts a spell of drunkenness on you.>
inc <drunkenness; #(enemy):drunk_spell#>
inc <CHR; #(enemy):drunk_spell#>
inc <STR; #(enemy):drunk_spell#>
dec <DEX; #(enemy):drunk_spell#>
dec <INT; #(quest):drunk_spell#>
set string <drunkLEVEL; drunk>
flag on <drunk>
timeron <sober>
end define
and here's the timer that slowly gets your stats back:
define timer <sober>
interval <10>
action {
if (%drunkenness% <= 0 ) then {
msg <You are feeling sober again.>
timeroff <sober>
set string <drunkLEVEL; sober>
}
else {
dec <drunkenness>
dec <CHR; 1>
dec <STR; 1>
inc <DEX; 1>
inc <INT; 1>
if (%drunkenness% < 10) and (%drunkenness% > 1) then {
msg <You are sobering up.>
set string <drunkLEVEL; buzzed>
flag off <drunk>
}
}
}
disabled
end define
paul_one
25 Jan 2006, 23:41The way I started to do it is have one long "status" string, and then do specific actions according to those strings.
That way you don't need to define 'specialties' into the middle of your code.
I was also using turn-based effects, as it was turn-based.
If you have multiple 'effects' which act like that - you could turn that code into a universal thing - as I was starting - and so instead of having 5 different timers etc - you would use one timer and one procedure to change the effects and whatever.
It'd be like setting a 'status' class, which has an action (say print out a message, or have an effect (remove HP/similar stuff), etc. Changes stats, and gives the player certain properties.
Just some food for thought..
That way you don't need to define 'specialties' into the middle of your code.
I was also using turn-based effects, as it was turn-based.
If you have multiple 'effects' which act like that - you could turn that code into a universal thing - as I was starting - and so instead of having 5 different timers etc - you would use one timer and one procedure to change the effects and whatever.
It'd be like setting a 'status' class, which has an action (say print out a message, or have an effect (remove HP/similar stuff), etc. Changes stats, and gives the player certain properties.
Just some food for thought..
Elexxorine
03 Feb 2006, 13:56the problem is that some conditions change stats/hp/whatever every turn, other just effect stats... the changing one's could just be in the afturnturn script.... and the latter a procedure when it is given to you....
i'll prolly use turn base, as it's easiest... but i prolly wouldn't get much time to work on neverquest, got tons of coursework and crap like that to do... pitty....
i'll prolly use turn base, as it's easiest... but i prolly wouldn't get much time to work on neverquest, got tons of coursework and crap like that to do... pitty....
lyteside
06 Feb 2006, 21:10that sucks...i really wanna see all the stuff you come up with.
Elexxorine
07 Feb 2006, 08:20hey thanks. i've seen your game btw... the massive one. i like how you did the colours. i'll prolly send you a copy of neverquest when i get the change. mostly been working on how not the make it crash, for example if no-one logs in for ages, etc.... did selling but haven't tested it yet (it was 11pm last night). currently i'm trying to think of how to do big maps, i can't use a grid system as it's mutliplayer... oh well. btw: coursework's slowly getting down. we're off timetable this week to just do coursework, which frees up some of my time. lol.
merries59
05 May 2006, 15:55What about a random results fight script? Something similar to a mud.
Hit <opponent>
Script starts
You are hit for # damage,
Monster is hit for #dmage,
You miss,
Monster hits you for #damage
Make it a random series of strings up to # damage reaches set amount then play 'die' script.
Hit <opponent>
Script starts
You are hit for # damage,
Monster is hit for #dmage,
You miss,
Monster hits you for #damage
Make it a random series of strings up to # damage reaches set amount then play 'die' script.