Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to set default monster values #20

Open
soul4soul opened this issue May 30, 2021 · 3 comments
Open

Add a way to set default monster values #20

soul4soul opened this issue May 30, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@soul4soul
Copy link
Owner

soul4soul commented May 30, 2021

Often times information is missing from creature files. A new monster is created with some default values to fill in the gaps and make the conversion work better especially when moving between formats of different systems where values don't match exactly for example TibiaWiki to TFS. TibiaWiki has no concept of StaticAttack so a default value is needed.

Instead of hard coding these values they should be made available as input so they can be set by the user. See monsters.cs for the current hard coded values

public Monster()
{
Voices = new List<Voice>();
MaxSummons = 0;
Summons = new List<Summon>();
Items = new List<Loot>();
LookTypeDetails = new DetailedLookType();
Attacks = new List<Spell>();
SummonCost = 0;
Attackable = true;
Hostile = true;
Illusionable = false;
ConvinceCost = 0;
Pushable = false;
PushItems = false;
PushCreatures = false;
TargetDistance = 1;
StaticAttack = 95;
LightLevel = 0;
LightColor = 0;
RunOnHealth = 0;
IsBoss = false;
HideHealth = false;
AvoidFire = true;
AvoidEnergy = true;
AvoidPoison = true;
// Immunities
IgnoreParalyze = false;
IgnoreInvisible = false;
IgnoreDrunk = false;
IgnoreOutfit = false;
// Defences
TotalArmor = 10;
Shielding = 5;
// Elements
Fire = 1;
Earth = 1;
Energy = 1;
Ice = 1;
Holy = 1;
Death = 1;
Physical = 1;
Drown = 1;
LifeDrain = 1;
ManaDrain = 1;
}

@soul4soul soul4soul added the enhancement New feature or request label May 30, 2021
@EPuncker
Copy link
Contributor

EPuncker commented Oct 1, 2021

I strongly suggest to keep IgnoreInvisible default to true, its less abusable if it pass unnoticed, most of monsters with this value as unknow are bosses and that would be a problem 😄

@soul4soul
Copy link
Owner Author

I strongly suggest to keep IgnoreInvisible default to true, its less abusable if it pass unnoticed, most of monsters with this value as unknow are bosses and that would be a problem 😄

Good Idea, While this issue is still open and I don't plan on fixing it for a while I changed the default value for the IgnoreInvisible to true.

@soul4soul
Copy link
Owner Author

I was thinking about this issue the other day, a simple way to go about implementing this would be to have the program default to reading a local config file which provides keyed values. Possibly a basic ini style file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants