map cure spell cost not applied?
Moderators: marionline, SDHawk
-
- Slime
- Posts: 20
- Joined: Mon Feb 13, 2017 10:28 am
- Location: Moscow
map cure spell cost not applied?
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?
Is this intentional?
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
-
- Slime
- Posts: 20
- Joined: Mon Feb 13, 2017 10:28 am
- Location: Moscow
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)
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)
Last edited by LieMurderProfit on Sun Sep 16, 2018 11:25 am, edited 2 times in total.
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.
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.
- Nathan Karr
- Liquid Metal Slime
- Posts: 1215
- Joined: Fri Jan 25, 2008 3:51 am
- Contact:
-
- Slime
- Posts: 20
- Joined: Mon Feb 13, 2017 10:28 am
- Location: Moscow
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.
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.
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.
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.
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.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
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.
-
- Slime
- Posts: 20
- Joined: Mon Feb 13, 2017 10:28 am
- Location: Moscow
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.
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.
Last edited by TMC on Tue Sep 18, 2018 2:10 pm, edited 3 times in total.
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.
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.
Last edited by TMC on Thu Sep 20, 2018 11:15 am, edited 2 times in total.
- Bob the Hamster
- Lord of the Slimes
- Posts: 7658
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact: