It is currently 20 Jul 2019, 14:02
   
Text Size

Updates on the way.

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

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

Re: Updates on the way.

Postby Muh Control Deck » 16 Oct 2015, 11:40

Muh Control Deck wrote:
Aswan jaguar wrote:
Muh Control Deck wrote:So far that works and gives me a stable Thieves Hideout 1 but attempting to install any more recent updates gives me crashes during duels within the first 4 turns (I can't tell why)
You have installed Thieves Hideout 1 SO you can ONLY install Thieves Hideout 2 it seems that you tried to install Loremaster's Tower 3 over Thieves Hideout 1 [-X which is an update ONLY for Loremaster's Tower 2.I guess that is what breaks your game.
Actually it was upgrading to Thieves Hideout 2 that gave me my most recent spat of crashes. Even with installing everything to the desktop, I can't seem to get a stable Shandalar beyond TH1
Upon closer analysis it seems that the crashes only happen during duels. So far I haven't found any consistent reason why (ie: drawing or using certain cards).
Muh Control Deck
 
Posts: 5
Joined: 20 Aug 2015, 03:17
Has thanked: 0 time
Been thanked: 0 time

Re: Updates on the way.

Postby Korath » 24 Oct 2015, 14:28

Muh Control Deck, I'm afraid you're going to continue to get ignored until you provide enough information to even guess at what's wrong. I had occasion to point someone else at Simon Tatham's excellent essay on how to report bugs the other day; you'd do well to read it too, if you want help getting this working.
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: Updates on the way.

Postby Korath » 24 Oct 2015, 14:39

So about Clockwork Avian and Clockwork Beast.

Some background explanation first. Bear with me, since this takes a while to get back to the subject at hand.

In Shandalar prior to Thieves Hideout (and in all versions of Manalink), when the AI activates an ability of a permanent, it displays the popup "Opponentname activates..." before actually activating the card. This has a tiny benefit, a moderate benefit, and an enormous drawback.

The tiny benefit is that it allows a card to display an arbitrary other card in the lower-right corner of the activation dialog, instead of it being forced to be the actual target of the ability. For instance, if activating an untargeted ability of an Aura, it can show the creature it's attached to rather than just leaving it blank.

The moderate benefit is that the "Opponentname activates" dialog is shown before paying the ability's costs, and before displaying the popups for other choices made (for modal abilities, for selecting which ability to activate when a card has more than one, for resolving triggers caused by paying those costs, etc.) So, before, you'd see e.g. "Paladin activates Northern Paladin" with a picture of your Erg Raiders in the lower right, then the AI taps and sacrifices a Black Lotus to pay for the {W} {W} activation cost, then it displays the "Processing..." dialog for the AI to handle the trigger from its Tablet of Epityr.

Starting in Thieves Hideout 1, you don't get the "Paladin activates Northern Paladin" until the end of that sequence, the same time it's displayed in multiplayer.

The reason why that's acceptable is that there's an enormous amount of bookkeeping that needs to be done exactly right in order to predict what needs to go onto that initial dialog in the general case. You need to know all the choices the AI will make to activate an ability that end up getting displayed - which ability it's activating, modal choices for that ability, targets it'll pick, amount it'll pick to spend on X. This is mediated by each card handling an EVENT_GET_SELECTED_CARD message, and each card peeking forward into the AI's chosen branch of its decision tree to see which decisions it'll make when the card actually gets its EVENT_ACTIVATE message and pays mana, picks targets, etc.

This mostly holds together in the original game, but it's complex and error-prone to get right when adding new cards. Manalink barely even tries; only a half dozen cards handle EVENT_GET_SELECTED_CARD individually, and a bunch of its auras force the auxiliary smallcard display to show the object being enchanted whether or not the ability has a target, and that's it. In order to get this fairly minor feature working right, essentially every card with an activated ability needs a handcrafted handler for EVENT_GET_SELECTED_CARD, and the overwhelming majority of cards don't have even a generic one.

For the original Alpha through The Dark + 4th Edition card set, this task was merely difficult, tedious, and error-prone. It turns out to be effectively impossible once you start adding ways to pay activation costs that have their own targeting choices. If, in the original example, the Northern Paladin's {W} {W} cost was paid in part by Springleaf Drum, then the Northern Paladin's EVENT_GET_SELECTED_CARD handler needs to know to look an extra step forward in the AI decision branch to get its target, since the first step will instead be the creature it's going to tap for Springleaf Drum.

To handle stuff like that correctly, each of the roughly 5000 cards with activated abilities would each have to account for each of the roughly 1000 cards with mana abilities. (And then they all have to do the same for any triggered abilities that can happen before the original card can choose its targets, since in the MicroProse MTG engine those will happen first, too.) That's... really, really not feasible.

So we can either accept that the activation popup will be wrong in all but the simplest cases, or display it afterwards and bypass the whole mess entirely. For now, I do the latter. There's some tricks I can potentially do to improve the interface - if an ability's being activated, maybe make the popup function only record what it's going to pop up until it's done activating, then play all those back in sequence, perhaps - but it's acceptable for now.

---

Back on topic, and why this impacts the Clockwork creatures:

Both Clockwork Avian and Clockwork Beast share a backend function; their only difference is that one starts with and has a maximum of four +1/+0 counters, while the other has seven. In that backend function, the handler for EVENT_GET_SELECTED_CARD doesn't peek forward into the AI decision tree, like every other card's EVENT_GET_SELECTED_CARD handler does - it decides then how much mana it's going to pay, stores that value in the global variable that gets read back for the "amount spent on X" display, and charges the AI that much instead of X when the card actually activates.

I can understand the thought process behind a decision like that. AI speculation doesn't run during upkeep at all, so there isn't a decision tree to look forward into; and a decision on how much mana to spend needs to be made in time to display that amount on the activation popup, before the mana is actually charged. But when all 107 other EVENT_GET_SELECTED_CARD handlers in the original game are information-only and make no changes to the game state or AI state, I can't help thinking that this must have been a violation of EVENT_GET_SELECTED_CARD's API. Or at least a poor idea.

Or maybe I just think that because, now that the event never gets sent to any card anymore, the AI is still forced to activate these creatures, and it always picks 0 and leaves me with egg on my face.

In any case, the fix is simple; they just need to recompute the amount to spend during EVENT_ACTIVATE too. So now they'll always tap every upkeep to add as many counters back as they can, so long as any are missing; which still isn't optimal behavior, but at least less objectively stupid as paying {0} each upkeep.

---

I think I've gotten as much done as I'm going to. Once I have the fix for the Clockwork critters in, I want to test for a while more, just for sanity's sake. Barring unexpected problems, expect a release tonight or tomorrow.

The handful of cards I added in between other stuff | Open
Armorer Guildmage
Ashen Rider
Cinder Shade
Civic Guildmage
Dimir Guildmage
Ethersworn Adjudicator
Goblin Marshal
Golgari Guildmage
Granger Guildmage
Gruul Guildmage
Hunting Moa
Lich Lord of Unx
Mikaeus, the Lunarch
Mogg War Marshal
Morphling
Nemata, Grove Guardian
Rathi Assassin
Selesnya Guildmage
Shadow Guildmage
Shaper Guildmage
Squirrel Wrangler
Sydri, Galvanic Genius
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: Updates on the way.

Postby gmzombie » 24 Oct 2015, 16:17

Wow um all I can say is what? Lol but seriously even if I can't understand it I know it is a lot of work and love every explanation. Thanks
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 855
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 199 times
Been thanked: 50 times

Re: Updates on the way.

Postby lujo » 24 Oct 2015, 19:32

Sooooo hyped! Thanks for the explanation, was an interesting read!
---

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

Nomad's Bazaar 1 / Thieves Hideout 3

Postby Korath » 25 Oct 2015, 16:27

.
Last edited by Korath on 19 Dec 2016, 19:22, edited 2 times in total.
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: Updates on the way.

Postby lujo » 25 Oct 2015, 18:14

Thank you, appreciating the changelog and I just had to:

[NB] Change displayed name for Uber Villain (really?) to Arzakon
XD
---

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: Updates on the way.

Postby lujo » 25 Oct 2015, 19:55

Srry could we get a screenshot of exactly how to start the duel testing mode for the shandalar engine? I've read the post and the gitlog part but don't have actual experience with command lines :(

EDIT: I put this into "run": C:\Magic\Manalink3\Program\Shandalar -e Decks

which got it to run a series of random duels, but how to make it to pick different options is confusing me.

EDIT2: I got it to work in a very dumbass way: I made a new directory in the main one, called it Test, put the Seer deck in (0069.dck), and then wrote: Shandalar -p test -e decks. I basically guessed that the -e meant enemy and then -p might mean player so I tried it. It worked and now I take stuff in and out of the test directory manually, lol. I suppose there's a smarter way to do this, but everything else it tried would attempt to start and crash. I don't mind doing it the stupid way, though, it's a very very very welcome feature!

(apologize for inducing groans and facepalms :oops: I can hex edit stuff and I've cracked stuff and modded stuff but I never learned the very basic things like command line usage).
---

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: Updates on the way.

Postby Aswan jaguar » 25 Oct 2015, 21:09

For those that have requested cards in the appropriate topic: here
don't forget to check and strike-through or mark as implemented any cards that have been implemented in the new Nomad's Bazaar 1 update.If you have forgot to do so with previous updates please do so,too.
Korath has requested this very simple thing to make his work a bit easier while he tries to implement our requested cards so guys show some appreciation of his time and effort.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 6385
Joined: 13 May 2010, 12:17
Has thanked: 539 times
Been thanked: 274 times

Re: Updates on the way.

Postby Korath » 25 Oct 2015, 21:47

cmd.png
cmd.png (9.04 KiB) Viewed 5024 times
console.png
The first google hit I get for "windows command-line tutorial" is http://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html, which is pretty straightforward.
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: Updates on the way.

Postby lujo » 25 Oct 2015, 22:11

Another stupid question - I've pasted both downloads one over the other into the program folder. I open the deck builder, filter out everything but the "block" section which used to show me cards which are in shandalar and I see no new cards. What could I have done wrong? Has anyone who downloaded it tried it and it works?
---

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: Updates on the way.

Postby dingbat1 » 25 Oct 2015, 22:30

This is fantastic, thank you Korath, keep up the good work.

I have a question. Is there an easy way to see which cards are now in Shandalar? Would you happen to have a sortable list?


As an aside, somehow Manalink isn't working for me (not sure if it ever worked on this computer, tbf) but I'll worry about that later.
dingbat1
 
Posts: 103
Joined: 08 Apr 2015, 13:48
Has thanked: 1 time
Been thanked: 32 times

Re: Updates on the way.

Postby Korath » 25 Oct 2015, 22:38

lujo wrote:Another stupid question - I've pasted both downloads one over the other into the program folder. I open the deck builder, filter out everything but the "block" section which used to show me cards which are in shandalar and I see no new cards. What could I have done wrong? Has anyone who downloaded it tried it and it works?
dingbat1 wrote:I have a question. Is there an easy way to see which cards are now in Shandalar? Would you happen to have a sortable list?
The answer to both is buried in the how-you-can-help section:
Korath wrote:To run the standalone deckbuilder limited to cards programmed in Shandalar, run Shandalar with
Code: Select all
shandalar.exe --deckbuilder
And running with the --card-list option will list all valid cards as text.
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: Updates on the way.

Postby lujo » 25 Oct 2015, 22:41

Ah, ty! I knew I saw something like that! Also something else I can't find - how to acess the debug console in the neverending duel mode? To edit player lives and see opponents hand and such?
---

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: Updates on the way.

Postby Korath » 25 Oct 2015, 22:44

It's an option that has to be enabled in Shandalar.ini - [Duel]EnableDebugMode, pretty close to the top.
User avatar
Korath
DEVELOPER
 
Posts: 3408
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

PreviousNext

Return to Shandalar

Who is online

Users browsing this forum: No registered users and 0 guests


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 0 guests

Login Form