Modifying the action menu at runtime

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Modifying the action menu at runtime

Post by Zyx »

Just for the sake of it, I was wondering how difficult it would be to change the actions of a given item during the game.

For example, instead of Brandish for a staff, it could become "Possess" when in front of a slime, then "Come closer" / "Go away" if the action was successful, etc.

Or your empty hand could allow to speak to humanoid, like "Accept", "Refuse", "Argue" when trading with the merchant, etc.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

An "Attack Menu Filter" looks pretty easy,
in principle. How would it work? Where
would the words come from? CSBgraphics.dat??
That requires a couple of programs to be
updated.

Any suggestions?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

One idea-- no clue how feasable this is:

The DSA is passed the number of the attack method, and the number of the attack method whose name should be displayed.

By changing the numbers, the attack method itself can be pointed elsewhere, or another name can be popped up but the method itself left alone.

Perhaps if you're feeling truly creative (or, as you so wisely put it, feel like debugging other people's attempts at cleverness), a negative index could point to some other table of strings instead.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

Don't know if it helps for getting a solution but dependence of an item in the off hand for actions in the main hand would be a nice
addition I think.

for example:
you have a set of 2 blades .
the first blade acts as a normal sword until you have the
second one in your shield hand (effectively being useless there)
both held , each in one hand you can use a dual attack option
or get the third attack option available..
same for a 2h sword which can be only used properly
as long as you do not have anything held in the off hand slot.[ dual wield and 2h wielding]

recharge staff>hold a recharge item (power globe/bullets?)
to increase charges by 5 of some item(probably worn in the offhand).
or vice versa . The staff could also have a recharge action which is
greyed out until a mana essence is put in the offhand.

ermm.
a combination of good attacks would come in handy, too.
for example you are a master ninja and have a club in hand,
so you get throw , bash , kick (because you can)

I would love to combine items , like upgrading clubs to warclubs or the like, but I think you will need more items in general
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Two handed sword option is easy enough (I actually already coded something similar in my aborted CSBwin dungeon through the attack filter) but the changing menus before is trickier, because that would require a whole new filter i would guess to interrupt the display of the weapons actions when you click them, rather than anythign you can fake in the party attack filter

Increaing charges would be doable already, though i guess better with a weapon action filter (as an uncharged staff could not have an attack option for you to power the staff through in the attack filter)

I was goign to generate a whole set of 'new' items by simply using the 'charge' option of weapons. Only got round to the names and hooks unfortnately. So instead of a sword, you have a 'sword' type, and viewing the item you could see if it were a normal sword, falchion, Machete or sabre, for example. They would all have the same sword options, of course but a flachion might do better damage or add to defence for a chop while a sabre might actually be better for swinging, etc

It would have been easy to code class features too, like a chop from a falchion being better for a fighter of x level and a chop of a machete being better for a ninja of x level, etc

Zyx already coded a dual weild option (a counter attack with shield), and i had a similar idea i never coded, where at higher fighter levels you would, if you had a lesser wepaon in your off hand, and used a lesser attack option, find the recharge time had zeroed and the weapons swapped hands so you could make a second attack fast before the weapons swapped back.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

interesting . I am amazed how much is readily available.
I will add some more when I have more time.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Note upgrading clubs would be easy too

I changed some of the attack options to 'add' and 'use'

If you then associated the 'use' option with something like a spike, you could ahve the party attack filter check your off hand - you you have a club there, then you delte the spike, move the club to your hand, and have it have a charge of one that now indicates 'warclub' and adds damage on attacks

If there were no club in hand, the 'use' option would instead be a stab

Note that you could even have a generic item type that kinda looks liek a few thigns - base it on a potion, so you have up to 255 combinations if you like (some items might have multiple charges for indicating stuff)

Give them all a 'use/throw' option and you can have quite a few fun general items - you can intercept the actions in the party attack filter to have other consequances happen on a throw too!

So you might have a general mess of 'sticks' - you could then have matches (use to light or burn stuff, has a number range as you reduce the amoutn you possess), spikes (add them to a club, or throw them on the floor to create a tile that blocks or damages anyone going across), glowlight that create long light when used or explode liek a fireball when thrown - etc

It's quite clever what you can do when you combine adge and CSBwin together. Still limitations, but nto as many as you might think

Oh, as to increasing items, another trick is to use the charged version of an opbject as a whole different type to the uncharged version. Providing the charged option has no charged attacks associated, or if you detect the charges in it and do soemthign else (a ring crumbles to ashes if it is used with one charge remaining) then you will nevre have the swap.

It will require you to then use DSAs to check that you are using the charged or uncharged version of an item on an alcove, lock etc - but it allows you to have two totally seperate looks (as long as the item s can share their weapon/clothing type and attack options. Note that having charged attacks is good for this, the unchagred will have less attack optiosn than the charged version.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

yeah, I guess I have to check in that programme once more.
Maybe play conflux to see what's possible seems to be a good idea,too.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”