BaseMapObject : Object
{
point_t pos;
bool dying;
}
MapItem : BaseMapObject
{
army_t guards;
string msg;
sprite id;
MAP ITEM_TYPE type;
}
M-Mineral : MapItem
{
MINERAL_TYPE type;
int count;
}
M-CampFire : MapItem
{
MINERAL_TYPE type;
int count;
int gold;
}
M-Artifact : MapItem
{
a-type type;
}
M-Guard : BaseMapObject
{
int joinChance;
creatures guards;
string msg;
sprite spr;
GUARDS_DISP disposition;
bool not_grow;
}
M-Contruction : BaseMapObject
{
...
-activate( hero )
}
Visitable-Con : M-Contruction
{
bool custom_gui;
army_t guards;
string msg;
visitors list[];
class*
}
V-Stable : Visitable-Con
{
}
V-Dwelling : Visitable-Con
{
int growth;
CRETYP creature;
int count;
}
V-Treasury : Visitable-Con
{
bool visited;
rewards list;
}
//
Own-Constr : M-Construction
{
army_t guards;
player_n owner;
class*
}
/////////////////////////////////////////////
ConstructionProto : AvatarsHolder?
{
Text name;
id protoId; ??
}
VisitableProto : ConstructionProto
{
bool fixed_guard; ?
Text visit_first;
Text visit_second;
VIS_CNST type;
}
MoraleLuckMod_VPro : VisitableProto
{
sint morale;
sint luck;
}
PrimSkMod_VPro : VisitableProto
{
PrimSkills modifier;
}
Dwelling_VPro : VisitableProto
{
CREAT_TYPE type;
}
Treasury_VPRo : VisitableProto
{
SPELL_LEV level;
TrVarCtr vars?;
}
Teleport_Proto : VisitableProto
{
uint mode;
uint index;
}
OwnedProto : ConstructionProto
{
Text msg;
Sprite icon;
OWN_TYPE thetype;
uint8 scouting;
}
OwnedUpgrader : OwnedProto
{
skills list;
}
////
///
CastleProto : ConstructionProto
{
uint config;
CTL_TYPE type;
CTL_SIZE size;
CTL_ORIENT orient;
}
//////////////////////////////////////////
//////////////////////////////////////////
Note CoverHolder & AvatarsHolder classes (base to all prototypes!)
CoverHolder - [passability] list of relative cells covered with entity
AvatarsHolder- [visual] list of avatars with relative positions
///////////////////////////////////////
// resourse data
-- heroes
nCount
HeroTemplate {
uint8 type
uint16 iconIdSmall, iconIdBig
sint16 tidName
--
>>FurtSkills
>>SecSkills
>>Spells
>>Cost
}
-- path elements (+walls)
nCount
PathTemplate {
uint8 type;
sint16 tidName;
sint16 spriteId;
uint8 level??
sint8 passMod;
}
-- visitables
nCount
VisTemplate {
>>
}
-- ownerables
nCount
OwnerTemplate {
>>
}
-- Castles
nCount
CastleTemplate {
uint8 type;
uint8 size;
uint8 orient;
uint16 cfg;
>>passability
}
-- artifacts
nCount
ArtifactTemplate {
>>
}
-- battle obstacles
-- credits text
///////////////////////////////////////////
///////////////////////////////////////////
iRewardItem =
TYPE
sint aparam
sint bparam
iRewardCtr =
RewardItem[]
iCreatGroup =
TYPE
int32 count
iArmy =
CreatGroup[7]
iPrSkills =
sint [ ATK, DEF, POW, KNO ]
iSecSkillsRec =
STYPE type
int8 level
iSecSkills =
iSecSkillsRec[]
iMineralSet =
int quantity[ MIN-TYPE-COUNT ]
iArtifactItem =
id
wornSlot
iArtifactList =
iArtifactItem[]
iPercSkills =
int values[ PERK-SKILL-TYPES ]
////////////////////////////////////
/////////////////////////////////////
MapGameObject =
{
events:
OnVisit = { }
OnDay = { }
OnWeek = { }
OnAttack= { }
OnBattleBegin = {}
OnBattleEnd( won ) = {}
...
components[ type ] = { }
}
Monster -- fights, joins, grows
Garrison -- leave an army, defends itself
Dwelling -- grow creatures, need to conquere
Treasury -- has a guard, grants a (random) treasure
WitchHut -- teaches something once
ArtCache -- grants an artifact
Castle -- Garrison + Dwelling + ResGen
Stables -- grant action points
Fountain -- modifies morale and luck
Obelisk -- grants piece of puzzle
Sign -- displays its own message
Gazebo -- grants experience
KeyMaster-- gives a key (perhaps on quest)
KeyTent -- blocks a passage, requres key
Shrine -- learn spell
TreeOfKn -- level up
Prophet -- mod primary
ShipWreck--
-------------------------------
Effect-Grant
To: Hero, Player
How: Unique, PerHero, OnceAWeek
What: Artifact, PrimarySkill, LearnSpell, Resource, MoraleLuckMod, Creature,
Key, SpellPoints, ExpPoints, ActPoints, Puzzle, LevelUp,
Effect-
------------------------------------
Categories: ---
Guards
IF_DIPLOMACY_WINS(visitor) JOIN
FIGHT
Garrison
PrimarySkillEnhancers
Dwellings
Shrines
Teleports
Treasuries
KeyMasters
Trigger
Presentation: None Decoration CompositeDecoration EditorVisual Activation: Dialog ToggleTrigger TakeOwnership GrandResource GrandModifers LearnSpell GrantPuzzlePiece GrantKey AdvanceNextLevel GrantExperienceOrGold GrantMP GrantMana GrantSecondarySkill DisappearIfPosessAKey Castle Garrison AltarPlace TradeMarket Dwelling TurnEvent: GrantResource RemoveModifier RemoveItem GrowDwellers GrowRandoms Ownerability: GrantOwnership Guarding: None RandomMob PresetMob
Activation:
OnTriggered
OnDate
OnStep
OnOwnership
OnResourceGained
OnPlayerKilled
?
==> ToggleTrigger
- Once
- PlayerSide
- IsHero
Condition:
PossesArtifact
PossesKey
PossesSpell
PossesResources
Effect:
RemoveSelf
SetTrigger
TRI-ID
Dialog
DLG-ID
EndGame
WinOrLoose
Teleport
Point
Assault
Army
GrantResource
ResList
GrantExperience
Range
GrantLevel
-
GrantMana
Range,Max
GrantMP
Range, Max
GrantModifier
?
GrantArtifact
A_ID
GrantSpell
SP_ID
GrantHero
HE_ID
GrantOwnership
CNS_ID
TakeResource
ResList
TakeMana
Range
TakeMP
Range
TakeArtifact
A_ID
?TakeSpell
SP_ID
TakeHero
HE_ID
TakeOwnership
CNS_ID
Hero: Global: Name Class Race Visual: HorseAni HorseSounds Portrait In-game: MP Mana Exp RPG: Level MajorAttributes Modifiers SecondarySkills ArmyStack: ?
TABLE_ID:
FIELDNAME_1:
type: TYPENAME
def: DEFAULT-VALUE
editable: EDITOR-NAME
base/hero_classes:
class_name:
type: string
home_castle:
type: @base/castle_types.id
###
face:
type: @base/res_pics.id#hero_icon
horse:
type: *range[ @base/res_spr.id ]
###
hs_attack:
type: int
hs_defence:
type: int
hs_wizdom:
type: int
hs_ssprob:
a-la ld scripts
MasterFile: GLOBAL.REZ
GAMEDATA.PAK {
SPRITES [PERMANENT] {
+GAMESPR.LINK
}
SOUNDS [TRANSIENT] {
+GAMESND.LINK
}
}
SpriteFile: SPRITE.REZ
SECTIONS {
HEADER {
NUM { U32:#SPRITETABLE }
ITEMS {
U32: @DATA.OFS, U8:SPRITETABLE.DX, U8:SPRITETABLE.DY, U8: SPRITETABLE.MODE, U8: SPRITETABLE.WIDTH, U8: SPRITETABLE.HEIGHT
} < SPRITETABLE.*
}
DATA {
SPRITETABLE.DATA
}
}
Base Types:
Base Resources:
SPRITETABLE [REF=RES/IMAGE] “Sprites” {
ID: [CONST,RES] = @RES.ID
WIDTH: [CONST,RES,DISPLAY("Width")] = @RES.WIDTH
HEIGHT:[CONST,RES,DISPLAY("Width")] = @RES.HEIGHT
OFS: [POINT8,DISPLAY("Displacement")] = POINT8(0,0)
}
- Picture
- Text
- Sound
Derived Resources: