Small Questions with Simple Answers

A discussion area for general design issues that staff would like detailed feedback on.

Moderator: Staff

User avatar
gorogorosama
Junior Member
Posts: 26
Joined: Sun Aug 09, 2015 4:12 pm
Contact:

Small Questions with Simple Answers

Postby gorogorosama » Mon Aug 10, 2015 2:52 pm

Where do we configure which monsters will be part of a battle? For example, when a battle starts in the cave, where do we configure that the monsters should be rats and snakes, and how many?
User avatar
gorogorosama
Junior Member
Posts: 26
Joined: Sun Aug 09, 2015 4:12 pm
Contact:

Re: Small Questions with Simple Answers

Postby gorogorosama » Mon Aug 10, 2015 3:14 pm

Is there a place I can configure myself unlimited dashing in dungeons for while I'm testing things?
User avatar
gorogorosama
Junior Member
Posts: 26
Joined: Sun Aug 09, 2015 4:12 pm
Contact:

Re: Small Questions with Simple Answers

Postby gorogorosama » Mon Aug 10, 2015 3:50 pm

How, specifically, is Agility used?

I input my command. I wait the warm-up time. I execute command. I wait the cool-down time... and then what?
User avatar
Roots
Dictator
Posts: 8660
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Small Questions with Simple Answers

Postby Roots » Mon Aug 10, 2015 4:56 pm

RE: How to configure monsters to be part of a battle

The easiest way to test different battle configurations is with the Test Interface. Go to the lua/test/ directory and edit battles.lua to add a new test. You'll see a test like the one below. Copy it, change the number in "tests[1001]" (test number should be unique). Add the appropriate ID of the enemy you want to the "battle::AddEnemy();" calls. The enemy IDs are in lua/data/actors/enemy_set_*.lua.

Code: Select all

tests[1001] = {
   name = "Single-Character Early Game Battle";
   description = "Party consists of a single character versus two early game enemies. A handful of potions are available " ..
      "in the party inventory as well.";
   ExecuteTest = function()
      GlobalManager:SetBattleSetting(hoa_global.GameGlobal.GLOBAL_BATTLE_WAIT);
      GlobalManager:AddCharacter(1); -- Claudius
      GlobalManager:AddCharacter(2); -- Claudius
      GlobalManager:AddCharacter(4); -- Claudius
      GlobalManager:AddToInventory(1, 3); -- Minor healing potions

      local battle = hoa_battle.BattleMode();
      battle:AddEnemy(2);
      battle:AddEnemy(2);
      battle:AddEnemy(3);
      battle:AddEnemy(5);
      ModeManager:Push(battle);
   end
}


After you setup a new test, you can access it from the test interface (the wiki page I linked to shows you how to get there) and quickly jump into the battle. This is much, much easier for testing purposes than changing up all the enemies on the map and walking around to fight them. If you need to do that though, I can provide information on how to configure the enemy parties that you encounter.


RE: Enabling unlimited stamina for dashing in dungeons

Open up the appropriate map file in lua/scripts/maps/ . (The cave dungeon at the beginning of the game corresponds to the file a01_unblock_underground_river.lua). Near the top of the file you'll see a line like "Map.unlimited_stamina = false;". Set this value to 'true'.

Furthermore if you're looking to test different scriptable events in the map and want to avoid any non-scripted battle encounters, find the call to "CreateEnemies();" and comment it out by beginning the line with "--". Then no enemies will be created or spawn on the map. (I'm 95% sure that this will work, but there might be other calls that need to be commented out like the creation of the enemy zones).


RE: How is agility used?

Had to do some digging to remember where this is calculated. In src/modes/battle/battle.cpp when we are loading the battle, we look at the agility rating of all characters and enemies and note the highest value (regardless of whether it is a character or enemy). Then we do the following to determine how long they sit in the idle state on the stamina bar:

Code: Select all

   // (4): Adjust each actor's idle state time based on their agility proportion to the fastest actor
   // If an actor's agility is half that of the actor with the highest agility, then they will have an
   // idle state time that is twice that of the slowest actor.
   float proportion;
   for (uint32 i = 0; i < _character_actors.size(); i++) {
      proportion = static_cast<float>(highest_agility) / static_cast<float>(_character_actors[i]->GetAgility());
      _character_actors[i]->SetIdleStateTime(static_cast<uint32>(MIN_IDLE_WAIT_TIME * proportion));
      _character_actors[i]->ChangeState(ACTOR_STATE_IDLE);
   }
   for (uint32 i = 0; i < _enemy_actors.size(); i++) {
      proportion = static_cast<float>(highest_agility) / static_cast<float>(_enemy_actors[i]->GetAgility());
      _enemy_actors[i]->SetIdleStateTime(static_cast<uint32>(MIN_IDLE_WAIT_TIME * proportion));
      _enemy_actors[i]->ChangeState(ACTOR_STATE_IDLE);
   }


Here's where MIN_IDLE_WAIT_TIME is defined. The value is in number of milliseconds (so 7.5 seconds)

Code: Select all

//! \brief This is the idle state wait time for the fastest actor, used to set idle state timers for all other actors
const uint32 MIN_IDLE_WAIT_TIME = 7500;


We are completely free to change this value to whatever we want to. The formula used to calculate the idle time can also be changed if you feel it necessary. Other than that formula, I don't think the agility stat is used anywhere else.


Also in between the cool-down time and the input of a command, we have what is called the "idle state", which is the standard amount of time that the actor must wait before they can begin preparing to execute their next action. The idle state corresponds to the portion of the action bar from the bottom up to the green "command" marker.
Image
User avatar
gorogorosama
Junior Member
Posts: 26
Joined: Sun Aug 09, 2015 4:12 pm
Contact:

Re: Small Questions with Simple Answers

Postby gorogorosama » Mon Aug 10, 2015 7:29 pm

Thanks! Another question from unblock_underground_river.lua

Code: Select all

   -- Group #02
   enemy = ConstructEnemySprite("snake", Map);
   SetBattleEnvironment(enemy);
   enemy:NewEnemyParty();
   enemy:AddEnemy(3);
   enemy:AddEnemy(3);
   enemy:NewEnemyParty();
   enemy:AddEnemy(6);
   enemy:AddEnemy(3);
   enemy:AddEnemy(6);
   zones["enemy02"]:AddEnemy(enemy, Map, 1);


This would imply that I'm either going to fight two snakes[3], or a snake and two Bats[6], yes?
User avatar
Roots
Dictator
Posts: 8660
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Small Questions with Simple Answers

Postby Roots » Mon Aug 10, 2015 8:17 pm

That is correct. The way it works is we decide which enemy sprites appear on the map, then for each sprite that may appear we configure one or more possible party encounters.
Image
User avatar
Roots
Dictator
Posts: 8660
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Small Questions with Simple Answers

Postby Roots » Tue Aug 11, 2015 10:34 pm

The following questions came from elsewhere and I wanted to answer them directly.

gorogorosama wrote:I've given Mark a Precision-Strike ability that will help him against the Bats and Rats which I gave high evade stats. I'll keep brainstorming cool abilities, but we also don't want to overload this very short level with too many things.

It may be more efficient to work on the skills considering everything that will be playable for the end of the year release? Is there some outline of what all that will include, enemy-wise? And how many levels the player will progress? How will unlocking skills work? So many questions!


The Roadmap outlines the sequence of events, maps, content, and pretty much everything going in to the year end release. Highly recommend you guys study it because it will greatly help you know where things are heading.
http://www.allacrost.org/wiki/index.php/Roadmap

To simplify, the year end release will have three maps that will have enemy encounters on them.
  • The cave map we all know - has very basic enemies and one end boss (Scorpion)
  • The Harrvah capital map - has various "demon" enemies that are a bit tougher, and also a yet-to-be-designed boss (armored beast)
  • A yet-to-be-designed sidequest, which will likely be either in the desert sands surrounding the captial city, or some sort of cavern/dungeon under the city. Will probably re-use enemies from the cave map here and likely will not have any boss (Claudius will be alone for this sidequest; Mark and Lukar will no longer be in the party)(

If the player completes all three maps, I think 3-4 level gains sounds about right. Skills can be unlocked in the game in any way we desire. Some will be learned naturally when levels are gained. Others may be granted as part of storyline events. Maybe we have some hidden challenges or sidequests that will let certain characters learn other skills. We decided long ago not to be boring by having "winning battles" be the only way for a character to grow and learn new abilities.

My thoughts on Claudius/Mark/Lukar: they are all knights of the same unit, so it makes sense that they all share the same skills (or have the ability to learn the same set of skills). Mark has 1-2 more skills than Claudius, and Lukar has 1-2 more skills than Mark. But all the skills that Claudius have, Mark and Lukar share (since they were all at Claudius' level of experience at one point in time). Mark and Lukar are not major characters, so I'm not worried much at all about their development (they're pretty much out of the game permanently after the first two maps with enemies). I also think it's cool to look at Lukar and Mark and how much stronger they are and what abilities they have, and for the player to realize "someday Claudius will be this strong and be able to fight this well and have these abilities". That's just me though.

I'll quit rambling on now. :rolleyes:
Image

Return to “Design”

Who is online

Users browsing this forum: No registered users and 3 guests