v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Status Effect Class

Discussions of the development process of the game.
Post Reply
lord midnight
Posts: 104
Joined: Sat Feb 05, 2011 9:23 am
Location: Oz

Status Effect Class

Post by lord midnight »

oscar stated several times on his wishlist of things is to get status effects going. The same thing has to be done for the scrolls Im doing, how should they be done?

I would think each status effect would need:

name duration attributeAffectedList specialFunctionCallCode repeatcount currentlyEffected

so name is obvious, duration is number or rounds it lasts (-1 fo perm), attreffectlist is an array of + or - values applied to the attribtes of a target entity, specialCode is for a switch/case with a set of methods for unusual actions that cant go anywhere, like fuse two items in inventory and make a mass of useless junk, repeatcount is for how many times the attributeeffect is applied, so you could have a that deal -5blocking for 6 turns in a row and lasts 100 turns before wearing off or whatever. current effected is a boolean in case you want to see if something is already affected in case it only woks once.


anyway, thats one way to do it, any other ideas? Oscar, do you have something in mind already?

Code: Select all

string name;
int duration;
effectList EList;
int effectCode;
int repeatCount;
boolean alreadyAffected
AND/OR's ...
Image
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Re: Status Effect Class

Post by oskarwiksten »

I'm thinking we do a bunch of const:ed values that represent the effect types that we can have. Let's say, for example, effectTypeID=1 means poison and effectTypeID=2 means bless.

Then we add a list of ActiveEffect objects on each actor, where each ActiveEffect is
effectTypeID:int
duration:int
maybe also a power:int representing the potency of the effect.

For multiple effect tokens (for example, posioned twice on two separate occasions), the list should contain two entries, since the different tokens should have different durations.

Then we add some "turn" or "round" concept into the timing, maybe generalise the regular monster movement timer in Controller. Let's say a turn happens every 5 secs, then we should make all effects apply every turn, and reduce their duration by 1.

Hm, we should also consider renaming them from "effects" to something better, since "effect" is both ambiguous and used for graphics animations (such as the red damage animation).
/Oskar
lord midnight
Posts: 104
Joined: Sat Feb 05, 2011 9:23 am
Location: Oz

Re: Status Effect Class

Post by lord midnight »

well, I noticed something looking at the item declaration and you can actually use them as a status type themselves. You are restricted to the attributes covered but there are plenty to play with:

https://spreadsheets.google.com/ccc?key ... ey=CMb5xjY
you can see thee that you can just add values in those columns to an Actor and it should work pretty easy, especially for direct item attacks like Im talking about, more complicated statuses could be based on a different system, or by applying one of these 'items' at intervals.

Now this is just the item category uh, attributes. These could be used for lots of things, critical could be for break chance or extra effect chance instead, the names of the item attributes dont have to be used the same way, but then you get into expanding the editors.

I think for "offensive items' using the existing system works ok for now, though more advanced things like hitting everything in the monster list, or multiple attacks, but there can be an attack item system here shortly.

Should I look at extending the Editors to include a more advanced item and status effect system, or is using the basic item attributes sufficient for defining status effects?, I guess intervals can be done on the statuses themselves along with duration and just call one of the actual item definitions. Which you would you prefer?
AND/OR's ...
Image
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Re: Status Effect Class

Post by oskarwiksten »

If we want to add new type of effects for items and combat traits, then I think we should SD them as new attributes on the combat traits class, instead of shoehorning them into the existing structure. This would also allow for interesting combinations.

But we should think hard on potential new attributes before adding them, so that it fits with both the world itself and with the rest of the combat system.
/Oskar
lord midnight
Posts: 104
Joined: Sat Feb 05, 2011 9:23 am
Location: Oz

Re: Status Effect Class

Post by lord midnight »

ok you finished this out. I read over the source and the other thread. this one can be merged or closed since the other one is there.
AND/OR's ...
Image
Post Reply