It is currently 25 Apr 2024, 07:03
   
Text Size

Monster tier shuffle discussion

MicroProse's Shandalar Campaign Game, now with new cards & a new look!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Monster tier shuffle discussion

Postby lujo » 04 Nov 2015, 22:58

Right, I've noticed this before but kept putting away a discussion on it.

Questions no.1: Is it possible to rename adventure mode enemies? Have renaming them be allowed in the INI?

Questions no.2: Is it possible to shuffle the ordering of enemies? The lose structure seems to be that the "tribal x-y" and the male and female counterparts are tiers 1-3 mono, with a few exceptions, but it's a bit of a bugger when it comes to designing decks in terms of progression.

Questions no.3, and this one's the one I'm the most interested in right now:

- Does anyone have a better idea than me about why 2 color enemies are distributed between 16 life and 20 life, and why in the seemingly nonsensical order?

From the spreadsheet I'm reading (which may or may not be accurate), it sayes that tier 4 (16 life) are

Mind Stealer (UB)
Elementalist (UR)
Fungus Master (UG)
Sedge Beast (BR)
Tusk guardian (WG)

While the 20 life bunch is:

Centaur Shaman (GB)
Winged Stallion (UW)
Ape Lord (RG)
Centaur Warchief (RW)
Lord of Fate (WB)

Which makes the second group significantly rarer than the first one (in case rarity's affected), and makes no apparent sense. Which tier the 2 color enemies should be, how they should be distributed according to whether they are firendly or enemy pairs and stuff , what's optimal - I can't say. But once they've been touched up, reworked, polished and all that, there's probably no reason power wise for this particular divide. Also, the second group seems to be a tier above Djinns.

At the very least, I think the two groups would have to be 5 friendly-color dudes / 5 enemy color dudes, simply so that there isn't an abundance of decks/cards of one color over another at different tiers (there not being a white Djinn is also irking me but we can't do anything about that yet).

Also, depending on which group to put at the lower rung, depending on what that governs, can influence deck building. There's way more support for friendly color combinations than enemy ones historically, but I'm not entirely sure what happens if the friendly pairs go first and what if the enemies do.

Anywho, one group should be:

Tusk Guardian
Ape Lord
Sedge Beast
Mind Stealer
Winged Stallion

and the other

Centaur Warchief
Lord of Fate
Fungus Master
Centaur Shaman
Elementalist

The friendly color decks are all easily buildable as offensive decks, while the other ones were built quite a bit more controlish / midrange in the OG pool. In general, more lives favor control, so I suppose the firendly guys whould go first and the enemy guys go last (but keep in mind that the later group comes after the Djinns ATM, at least according to this speradsheet I'm reading).

So, can at least this be done?

Anyone got a solid idea about why not?
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Monster tier shuffle discussion

Postby Korath » 05 Nov 2015, 01:50

Changing names: some parts look at the text at @DECKFACES in Menus.txt; some at the text in @CREATURENAMES and @CREATURENAMES_PLURAL in AdvStrings.txt. Sorting out which is which isn't straightforward. There's also some stuff that implies you'd need to update Rogues.csv or move images around in Exp1Art/Rogues/ or PlayFace/, but I suspect it's all dead code. Experiment a bit and let us know.

Moving enemies around or changing their (actual) base life: not for a long, long time. Enemies are most often referenced by their exact position in the list (the castle wizards, for example, are referenced far more often by checking whether an enemy's index is less than 36 and evenly divisible by 7 than whether its rank is set to ENEMYCLASS_BOSS), and second-most-often by their base life (when it needs to generate a dragon for a lair, for example, it picks among enemies with base life of exactly 18).

On the other hand, life can definitely be worked around by post-processing it just before a duel, the same way the life options in Shandalar.ini work. It might even be safe to swap 2-color-enemies' life so their distribution on the overland map works out right. Enemies in general should also be fairly resilient to having their colors changed, so you start seeing non-monocolor decks sooner, at least in the overland map; I haven't looked at how enemies are generated in dungeons yet.

If you want to experiment, the data starts at position 0x18fe08 in Shandalar.exe, and the format's in src/shandalar/shandalar.h (look for "struct shandalar_enemy_t". (The text there gets overwritten at runtime with the internationalized strings in AdvStrings.txt.)
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Monster tier shuffle discussion

Postby lujo » 11 Nov 2015, 05:32

Monster names seem to be editable by just editing AdvStrings.txt. This changes the name of a monster (seemingly) everywhere in adventure mode but not in duel (when you flip over to face). Duel names change if Menus.txt is edited (@DECKFACES).

I tried hex editing, and managed to understand this:

Code: Select all
char enemy_article[10];   // e.g. "an "
  char enemy_singular[50];   // e.g. "Undead Knight"
  char enemy_plural[50];   // e.g. "Undead Knights"
  char enemy_gender;      // 'm' for male, 'f' for female
But it didn't work as far as changing anything in game goes. I suppose that's what "gets overwritten by AdvStrings.txt" means. Except it doesn't get overwritten, my changes are in the exe after I've hexed it but they're not visible in game.

Err, I'm not sure what that means for the hexes in the exe. Do those get overwritten somehow? Or are they just free to use now? Eh, me and programming, we don't mix too well.

I'm not sure about wizards. Dunno if they're referenced anywhere else.

---

As far as how this helps anything, it can be somewhat handy for theming things according to tier.

Quick Bunch of ideas | Open
Druid
Elvish Magi - "magi" can be any number of things, "Shaman" for example
Enchantress - forcing a 60 card enchantress deck into a tier3 slot is quite difficult to balance, she can also be a number of things
Forest Dragon
Beastmaster - so many things this guy can be
Summoner
Great Druid

Seer - She could be a million things
Merfolk Shaman - Him being a "shaman" is very random
Conjurer - This is also pretty random
Sea Dragon
Shapeshifter - changing this opens it up for theming, it's the toughest blue enemy you can choose not to fight, she could be a variety of things if one wants
Thought Invoker - this is also quite vague, which isn't bad because it doesn't force a theme, but if one would want to stress a theme also pretty changable
Astral Visionary

Sorceress - This has always implied she uses "Sorcery" a lot, which, err, not really, and that's hard to pull off at this tier. Depending on the theme one would want her to do, she can be a number of things.
Sorcerer - This has the same problem. Also, he can be any number of things.
Troll Shaman - Oh, this guy can be a Giant! Or an Ogre! Or not a Troll, which there are only 2 off in Red in all of MtG. Heck, he can even be a Mountain Spirit XD
Goblin Lord - this guy doesn't have to be a Lord, at all :)
Crag Hydra - There's very few hydras around, this can also be flavored in many ways if one would want.
War Mage - this makes this guy sound more like my sorcerer rework than what he is in the OG. I'm fine with it, but he could be a million other things for a different theme.
Dragonlord

Cleric - Not that there's anything wrong with "Cleric" apart from the fact that it implies a tribe, but there's quite a bunch of things he could be including "Missionary".
Priestess - This is vague enough.
Crusader - Having a reason for this guy to not be a deck with Crusade specifically in it would be refreshing
Paladin - Also for this guy to not be themed on a protection / mainboard-sideboard gimmicks would also be refreshing
Arch-Angel
High Priest
Sainted One

Witch - I liked this, but if she was "Necromancer" there'd be a lot more you can do with her. And a lot more you could do with Necromancer, too :)
Undead Knight - He absolutely doesn't have to be an "Undead" Knight.
Warlock - Or if the Witch is Witch, trying to theme this guy easily makes them too similar, but if HE was "Necromancer" or "Cultist" or...
Vampire Lord
Nether Fiend - Plenty of ways to theme this guy too, although I'm quite partial to the OG name, myself
Necromancer - if this guy was "Lich" he wouldn't have to be zombie-tribal-or-off-flavor, yay ^^
Lichlord

The multicolored guys are a bit more boxed in by their art than their names, but still:

Tusk Guardian - not that it couldn't be worse or that it isn't open ended or anything, but there's probably ways to open this guy up to interpretation even more :)
Ape Lord - Oh well, he's an ape.
Sedge Beast - Oh, everything that applies to Troll Shaman except also Deamon and all sorts of other things ^^
Mind Stealer - he could be anything, really.
Winged Stallion - Err, art more than name.
Centaur Warchief - Also art more than name, but it's not like the name couldn't be used to tone down the theming problem.
Centaur Shaman - Same.
Fungus Master - Oh, god, yes, I can change this guy to be something that doesn't imply having Fungusaur or pingers in it, praise jeebus.
Elementalist - This is also more random than you'd think.


Anywho, not dead set on anything, but this makes my life quite a bit easier, whish I knew before. I'm a bit of a stickler to properly theming things as much as possible, and that seriously interferes with power tiers and what I even consider putting into decks. Anywho, v. nice to have the option to do this sort of thing.

It would be nice if this sort of thing was somehow governed by decks, though, so that if you're editing decks and changing enemy names for theming purposes (which translate to serious deckbuilding purposes and also overall product quality & enjoyment purposes), anyway, so that you didn't have to saddle folks with external files they have to overwrite / have backups for etc.

If I rename stuff I'll include backups in my download, but again, it would be quite handy.

---

As for changing how enemies are tiered, really, how would I go about swapping multicolored enemies to even out the color distributions?

I see this in struct shandalar_enemy_t :

Code: Select all
uint8_t enemy_base_life;
  uint8_t unk_c3;
  enemyclass_t enemy_class;
  uint8_t enemy_colors;
  uint8_t enemy_unused_c6;
  card_id_t enemy_signature_card;   // can't be offered as ante, and, stringified, is the filename for the enemy's deck (!)
  unsigned int enemy_TENTATIVE_movement;
  uint32_t enemy_unused_7c;
  enemyability_t enemy_ability;
  enemyreward_t   enemy_reward;
  card_id_t enemy_my_card;
But I'm not sure how it translates to hexes or anything else for that matter, that is, where to edit any of these values for individual enemies.

If I did, I could experiment, and also would.

---

Also, I've been told how to take invisibility off stuff, but I forgot where. I'm not just interested in that information for that, being able to do things with starting bonuses in general is something I'd like to test as it figures into deckbuilding and the relative power of various enemies.

Not to mention that I'm VERY interested in the monster summoning special power. If that thing could be combined with the way infinite duels lets you choose decks for yourself it seems to me that it can be used to give any enemy an ability to pick a random deck or "variant" of itself.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Monster tier shuffle discussion

Postby Korath » 11 Nov 2015, 20:46

uint8_t is 1 byte wide; card_id_t, unsigned int, and uint32_t 4. Looking just above shandalar_enemy_t's declaration, you'll be able to see that enemyability_t and enemyreward_t are also 4, and enemyclass_t is 1. Those declarations also show you the values that have to change to change the relevant abilities. The bitfield for color is defined in src/defs.h, as color_test_t; it's not declared as a color_test_t in shandalar_enemy_t because color_test_t is 4 bytes wide (despite only using the low byte), while only one byte is used here.

Example:
Troll Shaman starts at 0x190efc, and goes up to 0x190f87:
Code: Select all
00190ef0: 0000 0000 0010 0000 0000 0000 6120 0000  ............a ..
00190f00: 0000 0000 0000 5472 6f6c 6c20 5368 616d  ......Troll Sham
00190f10: 616e 0000 0000 0000 0000 0000 0000 0000  an..............
00190f20: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00190f30: 0000 0000 0000 0000 5472 6f6c 6c20 5368  ........Troll Sh
00190f40: 616d 656e 0000 0000 0000 0000 0000 0000  amen............
00190f50: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00190f60: 0000 0000 0000 0000 0000 6d08 0106 1000  ..........m.....
00190f70: 0501 0000 0001 0000 2000 0000 0000 0000  ........ .......
00190f80: 0100 0000 0000 0000 6120 0000 0000 0000  ........a ......
Plugging that into struct shandalar_enemy_t, we get:
  • char enemy_article[10] = "a " (and 8 nuls)
  • char enemy_singular[50] = "Troll Shaman" (and 38 nuls)
  • char enemy_plural[50] = "Troll Shamen" (and 38 nuls) (and, grr, dammit, the plural of "Shaman" should be "Shamans")
    (Those three get overwritten with the internationalized strings in AdvStrings.txt by function read_AdvStrings_txt() at 0x564ee7.)
  • char enemy_gender = 'm'
  • uint8_t enemy_base_life = 0x08 (which'll get modified higher by difficulty level, and even more by other things for lieutenants, wizards, and Arzakon; see life_of_enemy() in replace_functions.cpp)
  • uint8_t unk_c3 = 0x01 (affects bribe cost, and I think the number of bonus cards beyond ante you get for winning)
  • enemyclass_t enemy_class = 0x06, which is ENEMYCLASS_TROLL
  • uint8_t enemy_colors = 0x10, which is COLOR_TEST_RED
  • uint8_t enemy_unused_c6 = 0
  • card_id_t enemy_signature_card = 0x00000105 (ints are little-endian, so the 05 is stored first and the first 00 is last); in decimal, this is 261, so Troll Shaman stores its deck in decks/0261.dck, and can't offer Uthden Troll as ante (CARD_ID_UTHDEN_TROLL is 261, as enumerated in src/card_id.h)
  • unsigned int enemy_TENTATIVE_movement = 0x00000100 (little-endian storage again; these are the third and fourth columns on the second-last line). That's TENTATIVE_ENEMYMOVEMENT_INVISIBILITY in TENTATIVE_enemymovement_t, declared a bit above shandalar_enemy_t.
  • uint32_t enemy_unused_7c = 0x00000020. Nothing references this field, which makes it all the more peculiar that it's non-zero. A cut feature, perhaps.
  • enemyability_t enemy_ability = 0x00000000. The last two columns in the second-last line. Troll Shaman has no abilities. If it did, the bitfield's declared as enemyability_t; ENEMYABILITY_MIND_CONTROL is 0x2, so e.g. Mind Stealer has 0200 0000 starting at 0x19160c.
  • enemyreward_t enemy_reward = 0x00000010, so it has the ENEMYREWARD_LIFE_CARRY_OVER "reward", same as Vampire Lord.
  • card_id_t enemy_my_card = 0x00000000, so it doesn't have any particular card defined for the ENEMYREWARD_WIN_MY_CARD or ENEMYREWARD_MY_CARD_IN_NEXT_DUEL rewards or the ENEMYABILITY_HAVE_CARD ability (or its two duplicates).
And the 'a' at 0x190f88 is the start of the next enemy's article string.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Monster tier shuffle discussion

Postby lujo » 12 Nov 2015, 14:06

Thank you very, very, very much for this explanation!

After a bunch of staring at it I managed to make Conjurer and the Troll visible.

As an experiment I changed the base life for Winged Stallion and Ape Lord to be the same as the other three friendly color enemies (10), and Fungus Master and Elementalist to be the same as other enemy-color ones (14). Lets see what happens, if anything.

But now I'm curious about what is known about enemy spawning generally. Why am I getting dragons and djinns all over the place, but I had to reveal all the "islands" on the map to get a single Conjurer, and not a single Troll Shaman to spawn? The concepts of "late" and "early" opponents seem, in some regards, as quite nebulous.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times


Return to Shandalar

Who is online

Users browsing this forum: No registered users and 39 guests


Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 39 guests

Login Form