Top > Game Mechanics Final v0.2.0 > RK's Programming Notes
RK's Programming Notes
Spell References
This is just a general reference guide I wrote up.
| Speed | Type/Power | Examples |
| Single Action | Simple Spells Jewels Mystic Eyes | Tracing (Normal) Topaz (Tohsaka Rin) Mystic Eyes of Enchantment (Ciel) |
| One-Line | Simple but fairly useful/powerful spells Noble Phantasms Simple Barriers | Gandr Shot (Tohsaka Rin) - Finn Shot (Luvia Edelfelt) Excalibur |
| Two-Line | Power Spells | |
| Three | Extended Effects Multiple Hits | Gandr Shooting (Tohsaka Rin) |
| Four | Limited AOE | |
| Five | Normal AOE Useful Barriers | |
| Six | Stronger AOE Stronger Kekkai | |
| Seven | Reality Marbles (Mastered) | Unlimited Blade Works (EMIYA) |
| Eight | Reality Marbles Extreme Area of Effect | Unlimited Blade Works (Emiya Shirou) Sea of Flame (Cornelius Alba) |
| Nine | Death-Ray Spells | |
| Ten | Authoritative Spells Multiple Extreme Damage Top-Notch Barriers | Purification Incantation (Kotomine Kirei) Rain of Light (Medea) Rokugou Kekkai (Araya Souren) |
Top
Effect Templates (Conceptual Stage)
Effect Templates
----------------
[Value] [Stat] +20 Strength Atlas Gauntlets
[Value]% [Stat] +20% Attack Power Gladiator's Gauntlets
[Element] Root Element Ea - Enuma Elish
[Value]% [Element] 60% Fire Element Flamberge
Ignore Armor Assassin Stiletto
Ignore [Value] Armor Ignore 50 Armor Sharp Dagger
Ignore [Value%] Armor Ignore 70% Armor Vibroblade
Ignore Magical Armor Diarmaid's Magical Stave
Ignore [Value] Magical Armor Ignore 100 Magical Armor Anti-Magus Rifle
Ignore [Value]% Magical Armor Ignore 70% Magical Armor Ether Grenade
Unblockable
Unparryable
Unavoidable
[Value] Damage +20 Added Damage Sawtooth Blade
[Value]% Damage +5% Added Damage Sharp Cutlass
[Value] [Element] Damage +50 Lightning Damage Vajra
[Value]% [Element] Damage +10% Heat Damage Heat Sword (Noodle Knight)
Convert [Value] Damage to [Element] Convert 50 damage to Root Ryougi Katana
Convert [Value]% Damage to [Element] Convert 20% Damage to Wind Invisible Air
Casts [Spell] Casts "Exorcism" on Hit Exorcist's Cross
Inflicts [Status Change] on Hit Inflicts "Poison" on Hit Ebola Scalpel
Combat Effect Wrappers
----------------------
Definite Chance [Effect] on Hit Casts "Exorcism" on Hit Exorcist's Cross
[Value]% Chance to [Effect] on Hit 50% Chance to Inflict "Poison" on Hit Ebola Scalpel
If Missed, [[Effect]] If Missed, 5% Wind Damage Invisible Air
Top
Elemental Combinations
or, RK getting a headache and idly typing up an elemental reference guide.
What type of damage would you be inflicting if you inflicted two elements at the same time? Here are some examples, just for the hell of it.
| Element | Fire | Heat | Water | Ice | Wind | Lightning | Earth | Nature | Physical |
| Fire | Inferno |
| Heat | Nuclear | Melt |
| Water | Napalm | Steam/Boil | Deluge |
| Ice | Comet | Freeze | Hail | Glacial |
| Wind | Firestorm | Desert Storm | Typhoon | Snow Storm | Gale |
| Lightning | Beams | Lasers | Lightning Storm | Freeze Ray | Dry Storm | Ion Cannon |
| Earth | Magma | Ash/Smouldering | Mudslide | Avalanche | Tornado | Lightning Rod | Earthquake |
| Nature | Combustion | Radiation | Osmosis | Frostbite | Air Pressure | Nervous System | Body Structure | Organic Systems |
| Physical | Explosive | Scalding | Splash | Cold | Blow | Shock | Crush | Infection | Smash |
Top
Conversations with Self about StatGroups
What do I want to accomplish with this?
I want to be able to divide stats into four distinct parts. Base Stats, Adjusted Stats, Fields Stats, and Battle Stats.
How are they related to each other?
Base Stats + Character Modifiers = Adjusted Stats
Adjusted Stats + Equipment Modifiers = Field Stats
Field Stats + Battle Modifiers = Battle Stats
How do you wish to access these?
Ideally, I want it to be something like BasicStats->getSTR() or BattleStats->getATT().
So, they are pointers. What do they point at?
Alright then... how does BasicStats have a method like getSTR()?
Well, getSTR() is currently a method in the character class. So, it'd be a class that houses stats.
There we go! So, have will you call this class?
StatGroup. StatGroup BasicStats, AdjustedStats, FieldStats, and BattleStats.
StatGroup, then. What will it have?
Well, it'll have base and derived stats in there. Level and experience will not be included, however.
Should it have an identifier?
I'll put one for now, in case we can use it for something.
So... what else will it have?
Well, we don't need a name, since this should be transparent to the user... I don't think there's anything else we need. Oh wait, we need accessors and changing methods for each of them.
Alright, so get to it!
Top
Stat Hierarchy
Base Stats Base Stats
+ Base Modifiers + Character Modifiers
----------------- + Equipment Modifiers
Field Stats
Field Stats
+ Battle Modifiers
-------------------
Battle Stats
Base Stats
+ Character % Modifiers
+ Character + Modifiers
------------------------
Adjusted Stats
+ Equipment % Modifiers
+ Equipment + Modifiers
------------------------
Field Stats
+ Effect % Modifiers
+ Effect + Modifiers
------------------------
Battle Stats
Top
On Stat Programming Structure
How do should this be organized? Well, first, character modifiers should be easy to list. They also need to be easily applied. Right now, I'm thinking of a lookup table registry for each character. Should this be combined with the Equip--- no. Character Modifiers aren't as easily changed as Equipment Modifiers. In fact, an Equipment break might be possible, but a Character break isn't. Still, Character Modifiers should still be changeable, especially concerning Reality Marbles. That part would definitely be part of the Character Modifiers, being a core part of their thaumaturgical being.
Lessee... You have a Character Modifier registry, followed by a table of possible stat? That might be a huge waste of memory space, since there are a lot of stats, lots won't be touched, and most will not be filled. With 32-bit addressing, that would be a lot of wasted space. So... how do we make it easy to add, yet efficient for space?
Well, let's discuss the registry. First, you have an entry for a stat ID. Oh wait... how about a pointer to the StatType itself? You can call the ID easily that way, as well as get the name and abbreviation quite easily. So, 4 bytes goes to a pointer of the StatType. Next, it would be a pointer to the Character Modifier itself. Should that be inlined into the table, or should that be another pointer to an existing thing? I'm thinking of a pointer, but where would the Character Modifiers be placed in? Akasha? Actually, I think the Akashic database would be pointers to everything else, and pointers only. Everything isn't found at Akasha, just you can find everything by being there. Let's see... Probably stored on the character's themselves? Wait. That's the registry. I guess it would make sense to just be there.
So, we can list off the abilities very easily with the registry. Adding them is pretty easy. How about displaying them, a la World of Warcraft? Green "+15" on there or something. Well, let's recall how we create basic stats. Basic stats would be a base number. Say, Strength = 80. Then you'd have a character modifier of +10% Strength. In this case, that would be an additional 8 more points of Strength. When computing the Field Stats, it would take 80 right off of the base stats. Then it would go looking for Character Modifiers. No, wait. For display purposes, we use the Field Stats. It's green if it's modified. Perhaps a boolean table to check to see if it's further modified? Or... can we just scan the registry? Say, when it draws on there--- wait, why am I worrying about graphics problems right now? I just want the engine to take form.
Take all base stats. Import them into the field stats. Scan through the registry. If you've got--- OH. If you run across a strength modifier, add to it. If you run into any modifier, in any order, you can easily add to the field stats. Then, when graphics goes to access the numbers, you make a routine where it checks the field stats against the base stats. If it's different, you record the difference and change the font, color, whatever you want accordingly. Simple!
So, when you calculate the field stats, you take the base, add in the character scale modifiers then add in the character number modifiers. That give's the character's adjusted stats. Then you add in the equipment scale modifiers, followed by the equipment number modifiers. That gives you the character's field stats.
Base Stats + Character Modifiers = Adjusted Stats
Adjusted Stats + Equipment Modifiers = Field Stats
Now. Battle. You start out with your field stats. Effect modifiers are actually going to play a part on the equipment, and unless you character breaks... wait... character modifiers can change, too... right...? No wait. None of them should be directly touched. Effect modifiers only affect the context of the battle itself, with some status exceptions. Like when BL-tan gets poisoned by Constanze's Ackbar Doll. Mmm... Let's see.
So you have your Field Stats. Someone does an Armor Break (100%) on you. You lose all of your armor. It would be effect piled onto your character under a battle effect. When accessor methods relating to armor are called by algorithms, the effects would on your character would be checked. In fact, that would be a good way to offload some of the algorithm load. Perhaps multi-threading would be a neat issue to explore... Anyways, the character's methods would calculate and return the appropriate value. That's the entire point to delegation, encapsulation, and object-oriented programming. Oh wait. Won't really matter, would it? If we use--- wait. This is kinda' exactly what I wanted to avoid, isn't it?
We have maybe 26 stats. Multiply that by 32-bits, or 4 bytes, and we get 116 bytes per "stat sheet." We have base stats, adjusted stats, field stats, and current battle stats. That's four sets. Which would bring it to a 464 bytes for the pointers to the stats alone. Each Stat actually holds 64 bits of data: the pointer to the StatType (32 bits), and the value of the Stat (32 bits). So, triple the size. 1392 bytes of data for one character's stats. Multiply that by 15 characters. 20,880 bytes. Hmm... I wonder if there is a more memory efficient way to work with this.
Well, the key is to be both memory efficient and not try to make a hack, or do something that can easily be manipulated. Stressing the means, not the ends. Mmm... We have our basic stats. We only want to allocate memory to the pointers and data when needed. So, if we have a registry, perhaps it can be like the Junction ability from Final Fantasy 8. No, wait, that doesn't give me a good indication of how things work.
Basic Stats. They currently hold Type and Value.
You know what. I don't think I should care about the memory allocation at this moment. This will be a demo, and I would want to balance efficiency and speed. I'm going to revamp the mechanics for Reality Marbles, right?
Alright, so I'll go with the four layers of stats for now. We'll see how things turn out, performance-wise. I sure hope I don't end up with a whole mess of orphaned pointers.
Top
Techs vs. Spells
So, what is the difference between Techniques (Techs) and Spells?
On the surface, Techs are special physical abilities, while Spells are special magical abilities. Fundamentally, they tend to differ in fundamentals and utility.
Techs are mainly used by those fighters who are inclined to fight in more "traditional" way through hand-to-hand combat, melee weaponry, firearms, technology, etc. Most of the time, they will bear the "Physical" element, with notable exceptions of specialty bullets and advanced/exotic technology.
They also take into account the prowess of their users and can be logically seen as an extension of their normal fighting abilities. A gunner might use different bullets for an attack, or might go full-auto instead of semi- or burst. A brawler might grapple their opponent or perform a combo chain. Another person might just aim for an opponent's head or arm specifically for a desired effect. All of these attacks still rely on the basic combat skills that people use.
Spells, on the other hand, go against such methodical ways of destroying an opponent. They can cause a variety of different effects in a short span of time that would be impractical through normal abilities. One can suddenly put someone to sleep, or drop a comet on their head, or imprison them within a crystalline cage of ice. They can do what is possible through time and effort, but not practical in the least bit.
What are the advantages and disadvantages of each? Skills tend to be faster, have more hits, and easier to learn. However, they usually don't have as wide-ranging effects, rely on weapons, and have very limited elemental effects. Spells tend to have longer cast times and are harder to learn. However, they can have many different effects, have a wide-range of elements, and can hit VERY hard. Ether/Demon damage, anyone? Finn Shot Barrage?
Top
For the Demo
What would be the scope of battle mechanics for the demo?
Well, first, what type of battles would we have? We have the battle with the thieves in the beginning, followed by the random encounters as BL-tan moves through the forest, then RK battle, the random battles at the fort, followed by dark knight, followed by the Chaos Beast, followed by the battle with the Mad Sage.
Alright, thief battle, first.
Participants include BL-tan and three thieves.
BL-tan should be able to:
- Fully functional stats
- Attack
- Defend
- Techs
- ManaTechs
- Spells
- Retreat (option, but does no good)
- Use items.
The thieves should be able to
- Fully functional stats
- Primitive AI
- Attack
- Defend
- Techs
- Retreat
- Use items.
Alright. First case: BL-tan's attack. Should be simple... except she uses two knives. So, let's do a thief's attack, first, as a basis.
Thief
- Mediocre stats. They're trash.
- Knife is a piece of equipment that needs statting.
Equipment
-> Weapons
---> Bandit Cutlass -> Bandit
---> Hisui -> BL-tan
---> Souka -> BL-tan
---> Fake Caladbolg -> RK
---> Broad Sword -> Chaos Knight
---> Security Staff #17 -> Mad Sage
--->
-> Armor
---> Hardenned Leather Armor -> Bandits
---> (BL-tan's Clothes) -> BL-tan
---> Enchanted Plate Armor -> RK
---> Chaos Cloak -> Mad Sage
---> Chaos Armor -> Chaos Knight
-> Accessories
---> Grimoire of the King Beast -> Mad Sage
---> Red Scarf of Justice -> BL-tan
---> Saber Pocketwatch -> RK
---> Valkyrie's Earring -> RK
Skills
-> Attack
-> Defend
-> Techs
----> Get Bandit Techs
----> Get BL-tan Techs
----> Get RK Techs
-> Spells
----> Get BL-tan spells
----> Get RK Spells
----> Get Mad Sage Spells
-> ManaTechs
----> Get BL-tan ManaTechs
----> Get RK ManaTechs
-> Retreat
-> Adrenaline 25%
-> Adrenaline 100%
-> Desperation Attack
No need for Common Skills, Reality Marble, or Emotional Burst.
Top
Melee vs. Gunners vs. Casters
There are three main stereotypes of people: melee combatants, gunners, and casters. What are the tactical and strategical advantages to each of them?
Melee combatants tend to be front/middle-row combatants. They can attack front-row combatants. They hit physically hit hard. They focus a lot on Techs, then ManaTechs, then Spells. They tend to be statted for physical prowess.
Strengths: Techs, Damage
Normal: ManaTechs, Utility
Weaknesses: Targeting, Spells.
Gunners are middle-ground. Think of them as army soldiers. They would be in the middle/back row. They can attack pretty much anyone they want... except for those specifically shielded, I guess. If it changes, then they can hit front and middle-row combatants with ease. They usually don't hit as hard as melee combatants (though they on occasion can), but they have a wider range of use. Backrow characters are harder to hit and damage. They focus a lot on Techs, with the occasional ManaTech. Spells would usually be a rarity. Why use spells when you can use technology? Or Outlaw Star-like Caster Shells? They are statted for a balance of mental and physical prowess. It takes more than just brawn to shoot, ya' know.
Strengths: Utility, Targeting.
Normal: Techs, Damage
Weaknesses: Spells, ManaTechs.
Casters tend to be magi that stay in the back row. They can target pretty much anyone they want with their spells. They focus mostly on Spells, and maybe some ManaTechs. Any Techs they have aren't as useful. They are heavily statted into mental abilities, leaving physical skills oftentimes quite lacking.
Strengths: Spells, Targeting, Damage
Normal: Utility
Weaknesses: Techs, ManaTechs.
Top
Equipment Prototypes
Equipment
Name Bandit's Cutlass
Type Sword
Attack Power 270 (50 + 220)
Hit Rate 95% (80% + 15%)
Piercing 10%
Upgrades +220 Attack Power
+15% Hit Rate
+5% Speed
+5% Critical Hit
+10 Added Damage
Name Hardenned Bandit's Armor
Type Leather Armor
Armor Rating 270 (50 + 220)
Magic Resistence 0
Pierce Defense 45% (25% + 20%)
Upgrades +220 Armor Rating
+20% Pierce Defense
Name Hisui
Type Knife
Attack Power 372 (12+350)
Hit Rate 100% (90% + 10%)
Piercing 70% (50% + 20%)
Upgrades +350 Attack Rating
+20% Piercing
Name Souka
Type Knife
Attack Power 372 (12+350)
Hit Rate 100% (90% + 10%)
Piercing 70% (50% + 20%)
Upgrades +350 Attack Rating
+20% Piercing
Name Red Scarf of Justice
Type Neck Accessory
Effects Unknown (?!)
Top
Comments (0)
You don't have permission to comment on this page.