Various topics Mystic currently needs help with

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Various topics Mystic currently needs help with

Post by Mystic »

This is for my big game, and hopefully first finished / released game.

Part One:

What happens when two elemental bitsets are on, if this is possible? And the enemy is weak to one and strong to the other, or weak to both, or anything else.



How are level ups calculated? If I have a "PowerTab" that increases Attack, and a level up happens, what is the end result? (Attack at that level)+1? Why? Does it calculate how much you should have at the previous level, then the next level, subtract, then add that new number to your current? What about an item that drops attack?



I have skills that characters can use if certain items are in the inventory. When is a good time to check if characters have the items to add to the skill lists? Every-step? If multiple characters have multiple skills that do this, will it slow anything down?



What all is saved in a save game? If I rename something with a script, will it still be renamed upon loading the game? Say an item, or a skill list, or anything. Or would I have to rename this stuff on reload? What isn't saved?



Thanks in advance. I'm sure more will come up as I familiarize myself with the engine some more.
User avatar
JSH357
Liquid Metal Slime
Posts: 1341
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

What happens when two elemental bitsets are on, if this is possible? And the enemy is weak to one and strong to the other, or weak to both, or anything else.

Uh, good question. I would recommend doing some testing to find out, but certainly someone knows. I'm pretty sure that positive properties override negative ones. E.g. Absorption > Resistance > Weakness

How are level ups calculated? If I have a "PowerTab" that increases Attack, and a level up happens, what is the end result? (Attack at that level)+1? Why? Does it calculate how much you should have at the previous level, then the next level, subtract, then add that new number to your current? What about an item that drops attack?

Stats are calculated via a formula at each level, if I'm not mistaken. In the past, it was not possible to keep the status bonuses from such items after leveling up, but I believe they work now.

What all is saved in a save game? If I rename something with a script, will it still be renamed upon loading the game? Say an item, or a skill list, or anything. Or would I have to rename this stuff on reload? What isn't saved?

I didn't know you could rename items. Skill lists/spells learned stay the same, global variables definitely maintain their values. I'm not sure about enemy stats or general bitsets (such as caterpillar walking).

Good questions. If these are the only things you aren't understanding I'd say you're already pretty familiar with the engine. Sorry I can't answer them all.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Aeth
Slime Knight
Posts: 110
Joined: Tue Oct 23, 2007 3:06 am
Location: Atlanta, GA

Post by Aeth »

Mystic wrote:Part One:

What happens when two elemental bitsets are on, if this is possible? And the enemy is weak to one and strong to the other, or weak to both, or anything else.
Well, this depends on the properties of the attack being used. Are you saying, like, if the enemy is strong to fire but weak to wind, and you use an attack that is fire and wind elemental? I think they will cancel each other out.
Mystic wrote:How are level ups calculated? If I have a "PowerTab" that increases Attack, and a level up happens, what is the end result? (Attack at that level)+1? Why? Does it calculate how much you should have at the previous level, then the next level, subtract, then add that new number to your current? What about an item that drops attack?
Correct, the end result will be what your attack power should be at that level normally +1. If you use a script to adjust a hero's attack then level them up, you can see this in action. (my game relies on this too.)
Mystic wrote:I have skills that characters can use if certain items are in the inventory. When is a good time to check if characters have the items to add to the skill lists? Every-step? If multiple characters have multiple skills that do this, will it slow anything down?
This doesn't really cause slowdown. It might have in the past, but the handler is so very much faster now. I would check it every step. (I do this too, but I don't use multiple skills.)
Mystic wrote:What all is saved in a save game? If I rename something with a script, will it still be renamed upon loading the game? Say an item, or a skill list, or anything. Or would I have to rename this stuff on reload? What isn't saved?
I can't remember offhand everything that is saved in a save game, but everything you listed is saved. The only things I can think of right now that are not saved are real-time changes to the master palette (using tweak palette(), etc.), enemy stats, and the map states saved using save map state().
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Re: Various topics Mystic currently needs help with

Post by Mogri »

Mystic wrote:What happens when two elemental bitsets are on, if this is possible? And the enemy is weak to one and strong to the other, or weak to both, or anything else.
The multipliers are combined. If the enemy is weak and resistant, it does a little less than 100% damage. If he absorbs and is weak, he heals 200%. I forget the exact percentages.
Does it calculate how much you should have at the previous level, then the next level, subtract, then add that new number to your current?
Essentially this is correct.
I have skills that characters can use if certain items are in the inventory. When is a good time to check if characters have the items to add to the skill lists? Every-step? If multiple characters have multiple skills that do this, will it slow anything down?
Every step is fine. You won't notice any slowdown.
What all is saved in a save game? If I rename something with a script, will it still be renamed upon loading the game? Say an item, or a skill list, or anything. Or would I have to rename this stuff on reload? What isn't saved?
These are new features and I'm not entirely sure. I know hero names will stay changed, and I think other names can be changed too. I'd run some testing on this before you make your game rely on it (though obviously you can use scripting to retain your changes).
User avatar
msw188
Metal Slime
Posts: 787
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

The elemental bitsets explanation is on the wiki somewhere. All the percentages are shown, but as Moogle1 said, they do NOT override each other; rather they are all combined. The percentages are NOT set up so that 'strong to' and 'weak against' cancel out completely, in fact, I'm pretty sure that the end effect of being both strong and weak to an attack is noticably different than being 'normal'. (enemy type percentages are different as wel - yet another thing to tweak)

The SAV format is consistently changing and improving. But to keep backwards compatability, I think there are certain things that the developers do NOT want saved with a saved game. I'm not sure about naming, but you can't rename items yet anyway. I'm guessing that most names are NOT saved, besides heroes (since the player can be given the option to rename a hero). But all global variables and strings certainly are saved, so you can save anything you want with enough plotscripting.

Every step is a decent check, and shouldn't produce much if any slowdown, but it may also not catch everything you want. For example, what if the player stands still and a battle-calling NPC comes up and touches him? What about battles started from any plotscript, actually? What if the player enters the menu, uses a skill, loses a needed item, and then goes back to the skill menu? If it were up to me, I would use a combination of two scripts to do this. First of all, I would customize the menu so that the option called "skills", or whatever, first runs the plotscript that checks the inventory and gives the characters the relevant skills before opening the actual "skills menu". This way, the plotscript will run anytime the skill menu is accessed. If the menu isn't being accessed it shouldn't matter what is in there, right?

Then, I would also have a special script for EVERY battle in the game that does the same thing. This script would be in the "instead of battle" script for every map, PLUS anytime you use the command "fight formation" you should call this script instead. This will keep your other plotscripts fairly clean and reduce any possible lag of an "every step" script, and also will free up the "every step" script in case you need it for something special in some other situation.

EDIT: There were a couple errors and ambiguities that I tried to clean up.
I am Srime
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

Thanks everyone. All of your answers were very helpful and I'll be sure to ask when there are other things I'm unsure of.

About the element bitsets, as long as they combine in some way, that is functionality that I want.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

<a href="http://gilgamesh.hamsterrepublic.com/wi ... ed%3F">FAQ: How is damage calculated?</a>
User avatar
camdog
Gameathon 2009 Winner
Posts: 194
Joined: Sun Oct 21, 2007 12:04 am

Post by camdog »

I have to ask... Where did these numbers come from? Elemental weakness doubling damage makes sense, but elemental strength reduces damage to 12%? And why not have enemy type weakness do double damage? Why 1.8 times the damage? It just seems so arbitrary, and it piques my curiosity.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

camdog wrote:I have to ask... Where did these numbers come from? Elemental weakness doubling damage makes sense, but elemental strength reduces damage to 12%? And why not have enemy type weakness do double damage? Why 1.8 times the damage? It just seems so arbitrary, and it piques my curiosity.
I pulled those numbers out of m...

Actually, I was making a rough ballpark guess at the elemental strength/weakness levels in Final Fantasy IV Easytype. I don't think I got it anywhere near exactly.

So in the long term, how about something like this? <a href="http://gilgamesh.hamsterrepublic.com/wi ... tals">Plan for more flexible elementals</a>
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

This crashes GAME:

Fang
Default Damage settings
Default Attack settings
No costs
Chain to Poison 75%
Do not chain if attack fails

Poison
Pure 100 -92% on the Poison Register
Default Target
No costs
Do not randomize
Fail if target is poisoned


The hero is poisoned currently, due to the Poison attack listed above. When the enemy uses Fang, I can see the graphic for a bit then GAME closes immediately, I think because of the chain effect, but maybe not. I'm not sure if it's something I'm doing or a problem, but I'll get a test case if needed. I'll also test with 100% chain to make sure that's what's causing it.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Are you using the stable release (voxhumana) or a nightly wip build?
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

Voxhumana; the WIP works slowly (about half speed) under WINE which is fine for Custom but not Game and I can't seem to build the source
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

I can not reproduce this in the WIP

What was the problem?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Mystic wrote:Voxhumana; the WIP works slowly (about half speed) under WINE which is fine for Custom but not Game and I can't seem to build the source
I remember your Wiki post about running in Wine. I was so mortified that I immediately added Linux builds to the automated <a href="http://hamsterrepublic.com/ohrrpgce/nightly/">nightly builds</a>.
Mystic wrote:I can not reproduce this in the WIP

What was the problem?
I'm not sure :(

But if you can provide a test case file, I could walk backwards through nightylies and try to spot the one where the problem went away.
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

Okay so another issue. This script works fine in voxhumana, but not in the WIP

Code: Select all

plotscript, findsource, begin
   suspend player
   show text box &#40;13&#41;
   wait for text box
   walk hero to X&#40;me, 9&#41;
   wait for hero &#40;me&#41;
   walk hero &#40;me, north, 2&#41;
   wait for hero &#40;me&#41;
   use door &#40;1&#41;
   wait&#40;4&#41;
   show text box &#40;18&#41;
   wait for text box
   walk hero &#40;me, west, 5&#41;
   wait for hero &#40;me&#41;
   walk hero &#40;me, north, 2&#41;
   wait for hero &#40;me&#41;
   show text box &#40;20&#41;
   set tag &#40;3,off&#41;
   set tag &#40;4,on&#41;
   reset palette
   update palette
   resume player
end

The problem is at the use door: in voxhumana, this goes fine, however, in WIP I end up in a different map, out of another door (there is no link to this second map at all.) I'll do some further testing to see if I can figure out other things, but it works in voxhumana, which is odd.

[edit] I'm pretty sure it's using door 1, then using door 1 again (not the exit door, which would lead back in this case) on the new map, leading to the seemingly random third map.
Last edited by Mystic on Mon Aug 04, 2008 10:57 am, edited 2 times in total.
Post Reply