Post new topic    
map cure spell cost not applied? 
 PostSat Sep 15, 2018 8:11 pm
Send private message Reply with quote
The spell I'm using outside of battle (map cure) has a spell cost, the damage is applied to the target but the cost is not applied to the attacker.
Is this intentional?
Liquid Metal King Slime
Send private message
 
 PostSat Sep 15, 2018 8:45 pm
Send private message Reply with quote
Which cost are you using? I know not all of them are implemented.

It should be considered a bug, I think.
 
 PostSun Sep 16, 2018 11:22 am
Send private message Reply with quote
I was using an SP & HP cost.
It would be really nice if the cost was applied to SP, if not I'll have to build a Spell Points db for all attacks and apply the cost to the attacker.
(My game is turn based, using Action Points)
Metal King Slime
Send private message
 
 PostMon Sep 17, 2018 1:04 pm
Send private message Reply with quote
I checked the code and found that only MP and (FF1-style) level MP costs are implemented, while HP, item and gold costs are unimplemented for out-of-battle attacks from spell lists. (And if the attack is triggered by using an item, then there are no costs aside from the item being used up).

What do you mean by SP? I assumed that SP is the MP stat in your game (ie the second stat), so that should be properly deducted while HP isn't.
Liquid Metal Slime
Send private message
 
 PostMon Sep 17, 2018 3:07 pm
Send private message Reply with quote
Can we get a per-attack bitset to enable HP, MP, and item costs on items used out of battle at some point? It's the easiest workaround I can think of for making an item that heals both HP and MP at the same time
NO EAT
 
 PostMon Sep 17, 2018 10:17 pm
Send private message Reply with quote
The cost is in MP, I referred to it as Spell Points because that's what it's called in the Global Text Strings.

The attack is called by using an NPC that calls a script that applies map cure.
ie. map cure (atk:Testy 1, h1, h2)

The damage is applied to hero (h1), but the MP cost is not applied to the attacking hero.

I have not added spell lists to the heros because I'm scripting all of my attacks.
Metal King Slime
Send private message
 
 PostTue Sep 18, 2018 1:54 am
Send private message Reply with quote
Oh, if you're using the "map cure" command, then no costs are applied, not even MP. That attack doesn't have an HP cost from the attacker, it modifies the HP of the target.

Nathan Karr wrote:
Can we get a per-attack bitset to enable HP, MP, and item costs on items used out of battle at some point? It's the easiest workaround I can think of for making an item that heals both HP and MP at the same time


I think we should have a global backcompat bit to enable spell costs for spells used from spell lists out of battle and the "map cure" command. Then "map cure" can gain an argument to optionally disable the cost.
On the other hand I guess items shouldn't apply costs by default, so we would want a per-item bit (not per-attack) to opt in to costs.

Implementing all of this should actually be pretty straightforward.
 
 PostTue Sep 18, 2018 5:31 am
Send private message Reply with quote
Thanks for the clarification. I'll have to implement a work-around.
Metal King Slime
Send private message
 
 PostTue Sep 18, 2018 2:06 pm
Send private message Reply with quote
I'd like to do something about this. We've been ignoring the problem for so many years.

There are many, many bugs related to attack costs. Plus we already have several attack bits that are basically there to enable fixes for previous bugs!
Rather than fix everything, right now I'd just fix part of the problem, including "map cure" ignoring costs.

I just started on it, by cleaning up the in-battle and out-of-battle cost checking and cost substracting code into the same form and next to each other, so now it's obvious what's missing and how to fix everything simultaneously.
 
 PostTue Sep 18, 2018 3:13 pm
Send private message Reply with quote
Thank you
Metal King Slime
Send private message
 
 PostThu Sep 20, 2018 11:14 am
Send private message Reply with quote
Progress: I've conducted an extensive survey of all attack cost bugs and spent hours just planning how to go about fixing them. (Not necessarily final, but I'm fairly happy with it)

Attack costs megabug

I think I will fix everything afterall. But adding an argument to "map cure" is actually a pretty tiny change, so I'll do that first.
Liquid Metal King Slime
Send private message
 
 PostFri Sep 21, 2018 9:41 am
Send private message Reply with quote
I just wanted to say that I read the megabug, and I like your plan TMC
Display posts from previous: