sIKE23 / Mage-Wars

Mage Wars for OCTGN
7 stars 5 forks source link

Automate Domination Scenario Setups #166

Closed sIKE23 closed 9 years ago

ACG8 commented 9 years ago

Well, import os seems to work for me now. Are you absolutely sure it will work for people without python installed?

sIKE23 commented 9 years ago

Yes, OCTGN has it own limited version of IronPython look in your OCTGN\OCTGN folder and you will see the dll and stuff to make all of it work.

ACG8 commented 9 years ago

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

sIKE23 commented 9 years ago

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne notifications@github.com wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886.

ACG8 commented 9 years ago

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne notifications@github.com wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564.

sIKE23 commented 9 years ago

That is perfectly fine with me! Let me know if the Dom-Constants.py makes sense to you......

On Wed, Feb 4, 2015 at 5:28 PM, anandaguneratne notifications@github.com wrote:

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne < notifications@github.com> wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub <https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886 .

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72962996.

ACG8 commented 9 years ago

It makes sense, and I can see how to use it. Unfortunately (or perhaps fortunately, depending on your perspective) I think I can probably make a placement algorithm that calculates the placement using only the size of the tiles and their relative position in the array, which would be more general purpose than the hard-coded coordinates (as in, it would work for any board dimensions, including ones larger than 6x6)...this would put a good amount of your hard work to waste, though. It is very good to have the definitions for each tile, as I am still not sure how assigning definitions to cards works (where does that long code come from?).

On Wed, Feb 4, 2015 at 5:44 PM, sIKE23 notifications@github.com wrote:

That is perfectly fine with me! Let me know if the Dom-Constants.py makes sense to you......

On Wed, Feb 4, 2015 at 5:28 PM, anandaguneratne notifications@github.com wrote:

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne < notifications@github.com> wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886 .

— Reply to this email directly or view it on GitHub <https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564 .

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72962996.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72965187.

sIKE23 commented 9 years ago

That is the card GUID in the set/xml file. Which is the name given each of the 13 board tiles Sslak, Usslak, and the Orb (which IRL will be a Marker but in OCT will be treated as a Card). The table.create method requires three arguments, GUID, X, Y Coordinates. That is why I have defined them here. You will see from last nights work I have them in a dictionary now. So my thoughts were from the #MAP# section 00DD00 you would be able to BTDict['BT_D'] and from the

Objects# 00SS00 you would be able to DomObjDict["S"] and DomObjDict["O

"]

The work on board, creature, and orb placement is to help with the dev process not necessarily used in the end product. For example I now know that I am happy to place creatures in the same coordinates used by the board tiles which lands them in the upper left hand corner of the board tile The orbs I thought looked best when placed in the opposite diagonal corner down and to the right from the creature. So for example:

You read in the above line for Objects and Maps and since all board tiles are 250 mm square, you can do the math to work from x = 0, y = 0 and outward. So you place the first tile as x = -250, y = -250. There is a Sslak and a Orb pair on this tile. The creatures coordinates are also x = -250, y = -250 and the orb will be place at x = (-250 + 175) , y = (-250 + 175).

at the end of the function with tile placement algorithm to determine x/y you would call

placeDomObj(x, y, BTDict['BT_D'], DomObjDict["S"] , DomObjDict["O"])

That function would sort of go like:

def placeDomObj(x, y, Tile, Creature, Orb) table.create("Tile", x, y) if not Creature == 0: table.create("Creature", x, y) if not Orb == 0: table.create("Orb", (x + 175), (y + 175))

Tile, Creature, Orb would be the GUID strings...........there is more logic needed of course for Usslaks and 2 orbs but the math is all done (MarkersAsCards size is 70 x 70 and Card Size is 60 x 80).

This is how main brain has theorized it would work. If you have a better solution I am open to it. I think I have done a good at describing my vision for this, if you have a better/quicker/easier way (for you) go for it.

Let me know if you have any questions.

On Thu, Feb 5, 2015 at 3:44 AM, anandaguneratne notifications@github.com wrote:

It makes sense, and I can see how to use it. Unfortunately (or perhaps fortunately, depending on your perspective) I think I can probably make a placement algorithm that calculates the placement using only the size of the tiles and their relative position in the array, which would be more general purpose than the hard-coded coordinates (as in, it would work for any board dimensions, including ones larger than 6x6)...this would put a good amount of your hard work to waste, though. It is very good to have the definitions for each tile, as I am still not sure how assigning definitions to cards works (where does that long code come from?).

On Wed, Feb 4, 2015 at 5:44 PM, sIKE23 notifications@github.com wrote:

That is perfectly fine with me! Let me know if the Dom-Constants.py makes sense to you......

On Wed, Feb 4, 2015 at 5:28 PM, anandaguneratne < notifications@github.com> wrote:

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne < notifications@github.com> wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564 .

— Reply to this email directly or view it on GitHub <https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72962996 .

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72965187.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73019384.

ACG8 commented 9 years ago

Yes, that makes sense, and is more or less how I intended to implement placement. Thanks for putting them in a dictionary; much nicer. I was going to make multiple passes for each layer, but placing each tile and its contents one at a time would work as well. I just meant that we don't need to hard-code the coordinates of everything, since we can just have the game compute the coordinates on the fly for each board.

Regarding the labeling in the dictionaries:

On Thu, Feb 5, 2015 at 9:20 AM, sIKE23 notifications@github.com wrote:

That is the card GUID in the set/xml file. Which is the name given each of the 13 board tiles Sslak, Usslak, and the Orb (which IRL will be a Marker but in OCT will be treated as a Card). The table.create method requires three arguments, GUID, X, Y Coordinates. That is why I have defined them here. You will see from last nights work I have them in a dictionary now. So my thoughts were from the #MAP# section 00DD00 you would be able to BTDict['BT_D'] and from the

Objects# 00SS00 you would be able to DomObjDict["S"] and DomObjDict["O

"]

The work on board, creature, and orb placement is to help with the dev process not necessarily used in the end product. For example I now know that I am happy to place creatures in the same coordinates used by the board tiles which lands them in the upper left hand corner of the board tile The orbs I thought looked best when placed in the opposite diagonal corner down and to the right from the creature. So for example:

You read in the above line for Objects and Maps and since all board tiles are 250 mm square, you can do the math to work from x = 0, y = 0 and outward. So you place the first tile as x = -250, y = -250. There is a Sslak and a Orb pair on this tile. The creatures coordinates are also x = -250, y = -250 and the orb will be place at x = (-250 + 175) , y = (-250 + 175).

at the end of the function with tile placement algorithm to determine x/y you would call

placeDomObj(x, y, BTDict['BT_D'], DomObjDict["S"] , DomObjDict["O"])

That function would sort of go like:

def placeDomObj(x, y, Tile, Creature, Orb) table.create("Tile", x, y) if not Creature == 0: table.create("Creature", x, y) if not Orb == 0: table.create("Orb", (x + 175), (y + 175))

Tile, Creature, Orb would be the GUID strings...........there is more logic needed of course for Usslaks and 2 orbs but the math is all done (MarkersAsCards size is 70 x 70 and Card Size is 60 x 80).

This is how main brain has theorized it would work. If you have a better solution I am open to it. I think I have done a good at describing my vision for this, if you have a better/quicker/easier way (for you) go for it.

Let me know if you have any questions.

On Thu, Feb 5, 2015 at 3:44 AM, anandaguneratne notifications@github.com wrote:

It makes sense, and I can see how to use it. Unfortunately (or perhaps fortunately, depending on your perspective) I think I can probably make a placement algorithm that calculates the placement using only the size of the tiles and their relative position in the array, which would be more general purpose than the hard-coded coordinates (as in, it would work for any board dimensions, including ones larger than 6x6)...this would put a good amount of your hard work to waste, though. It is very good to have the definitions for each tile, as I am still not sure how assigning definitions to cards works (where does that long code come from?).

On Wed, Feb 4, 2015 at 5:44 PM, sIKE23 notifications@github.com wrote:

That is perfectly fine with me! Let me know if the Dom-Constants.py makes sense to you......

On Wed, Feb 4, 2015 at 5:28 PM, anandaguneratne < notifications@github.com> wrote:

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne < notifications@github.com> wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72962996 .

— Reply to this email directly or view it on GitHub <https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72965187 .

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73019384.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73063318.

sIKE23 commented 9 years ago

The reason I used 1 thru C for the board tiles was that was how Aaron had the tiles labeled in the manual (1 - 12). So I am expecting from Domination manual that the tiles will be numbered 1-12. I have no issue with the generic tile being represented as a ".". If we want to be more creative I am fine with that also, whatever it is that we decide on we will have to make a key for those who want to make there own maps.

I have asked Aaron for a copy of the Domination rules manual if its ready hopefully he will get back to me today with it. That will help a lot (at least in my mind) on how we handle assigning variable names for the board tiles.

Three layers is fine with me. I was thinking that you would want to determine the X/Y coordinates once which is why I thought that you would read all three of the row in and then process as one. If you want to do it where all the tiles are placed, then creatures, and finally objects I am fine with the methodology also.

The hard coded coordinates were used to help me determine offset coordinates for the creatures and Orbs. They were for me basically to figure out where I wanted everything to go...

On Thu, Feb 5, 2015 at 9:36 AM, anandaguneratne notifications@github.com wrote:

Yes, that makes sense, and is more or less how I intended to implement placement. Thanks for putting them in a dictionary; much nicer. I was going to make multiple passes for each layer, but placing each tile and its contents one at a time would work as well. I just meant that we don't need to hard-code the coordinates of everything, since we can just have the game compute the coordinates on the fly for each board.

Regarding the labeling in the dictionaries:

  • It seems a little odd that generic tiles are labled D, when they are they are most common tile (players will be designing maps, hopefully, so we want something sensible). I was thinking, why not use '.' (i.e. a period) as the dictionary key corresponding to generic tiles? It resembles empty ground, and is easily recognizable. We might think about moving away from numbers on other tiles to characters more evocative; for instance, O for Samandriel's circle, or w for spiked pit. Alternately, we could go down the alphabetical route (make features easy to remember by name, not appearance), and have the first letter of the more relevant part of the name be used when possible (and something similar when not), such as m for corrosive mist, d for debris, or b for boneyard. The numbers are not easy for players to remember, and will require them to constantly look them up. I think those numbers correspond to the list of terrain tiles we playtesters were sent, but non-playtesters will likely not receive the same list.
  • I think we might want to have 3 layers; Map, Objects, Creatures, so that we can customize creatures and orbs in the same zone (if both are in objects, we need a character for each possible combination).

On Thu, Feb 5, 2015 at 9:20 AM, sIKE23 notifications@github.com wrote:

That is the card GUID in the set/xml file. Which is the name given each of the 13 board tiles Sslak, Usslak, and the Orb (which IRL will be a Marker but in OCT will be treated as a Card). The table.create method requires three arguments, GUID, X, Y Coordinates. That is why I have defined them here. You will see from last nights work I have them in a dictionary now. So my thoughts were from the #MAP# section 00DD00 you would be able to BTDict['BT_D'] and from the

Objects# 00SS00 you would be able to DomObjDict["S"] and

DomObjDict["O "]

The work on board, creature, and orb placement is to help with the dev process not necessarily used in the end product. For example I now know that I am happy to place creatures in the same coordinates used by the board tiles which lands them in the upper left hand corner of the board tile The orbs I thought looked best when placed in the opposite diagonal corner down and to the right from the creature. So for example:

You read in the above line for Objects and Maps and since all board tiles are 250 mm square, you can do the math to work from x = 0, y = 0 and outward. So you place the first tile as x = -250, y = -250. There is a Sslak and a Orb pair on this tile. The creatures coordinates are also x = -250, y = -250 and the orb will be place at x = (-250 + 175) , y = (-250 + 175).

at the end of the function with tile placement algorithm to determine x/y you would call

placeDomObj(x, y, BTDict['BT_D'], DomObjDict["S"] , DomObjDict["O"])

That function would sort of go like:

def placeDomObj(x, y, Tile, Creature, Orb) table.create("Tile", x, y) if not Creature == 0: table.create("Creature", x, y) if not Orb == 0: table.create("Orb", (x + 175), (y + 175))

Tile, Creature, Orb would be the GUID strings...........there is more logic needed of course for Usslaks and 2 orbs but the math is all done (MarkersAsCards size is 70 x 70 and Card Size is 60 x 80).

This is how main brain has theorized it would work. If you have a better solution I am open to it. I think I have done a good at describing my vision for this, if you have a better/quicker/easier way (for you) go for it.

Let me know if you have any questions.

On Thu, Feb 5, 2015 at 3:44 AM, anandaguneratne < notifications@github.com> wrote:

It makes sense, and I can see how to use it. Unfortunately (or perhaps fortunately, depending on your perspective) I think I can probably make a placement algorithm that calculates the placement using only the size of the tiles and their relative position in the array, which would be more general purpose than the hard-coded coordinates (as in, it would work for any board dimensions, including ones larger than 6x6)...this would put a good amount of your hard work to waste, though. It is very good to have the definitions for each tile, as I am still not sure how assigning definitions to cards works (where does that long code come from?).

On Wed, Feb 4, 2015 at 5:44 PM, sIKE23 notifications@github.com wrote:

That is perfectly fine with me! Let me know if the Dom-Constants.py makes sense to you......

On Wed, Feb 4, 2015 at 5:28 PM, anandaguneratne < notifications@github.com> wrote:

Personally, I would prefer the single characters approach (not delimited). It makes it much easier for map designers to picture the map that they are designing, because all the characters are aligned neatly in rows and columns. In your above example, the 13s would not work, therefore.

I can write something to process the code and place the tiles, though not immediately as I have some other things I have to do. Probably a few days.

On Wed, Feb 4, 2015 at 4:20 PM, sIKE23 notifications@github.com wrote:

I have done all of the work of where to place, coordinate wise, each object (board tile/creature/orb) what I don't have a clue is how to say for example say back to map 21V1

0,13,0,0,0 13,13,2,0,0 0,7,13,7,0 0,0,6,13,13 0,0,0,13,0

M,0,0,0,0 0,S,0,0,0 0,0,U,0,0 0,0,0,S,0 0,0,0,0,M

I am using comma as a delimiter for now until we get the nomenclature worked out. Are we going to use single characters to map out each of these or go with a delimited approach. I like both ideas we just need to put on our non-tech players hat and think what way works better. I moved the Mage to the Creature layout as I think that would be where we would want to process that.

Going with what you have proposed I an not sure of what I can write to process this. For example, when I asked about centering the board you replied:

"Regarding centering of tiles, we just compute the center of the arrangement, and then shift things so that it aligns with the center of the board. If we have a large array of tiles, the upper left corner just gets shifted more. The only information we need is the size of each tile and the layout of the board."

This is definitely more your forte than mine. Let me know what you think....

On Wed, Feb 4, 2015 at 3:54 PM, anandaguneratne < notifications@github.com> wrote:

Okay, the code for importing text files is basically done now (at least, it can correctly read multiple correctly formatted map layers from the text file and output them as a dictionary of arrays). At this point, all that we need is a function to interpret the arrays and convert them into an array of cards and map tiles on the board. I had the impression that you were working on this end already; is there anything you want me to do to help with this part?

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72947886 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72952564 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72962996 .

— Reply to this email directly or view it on GitHub < https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-72965187 .

— Reply to this email directly or view it on GitHub <https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73019384 .

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73063318.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73066296.

sIKE23 commented 9 years ago

We need to add in a bit of error handling. The first one should check to see that all three of the layers have the same dimensions, if not, pick another map. The second should note that a character in the map had no matching object in the dictionary.

sIKE23 commented 9 years ago

Are we going to do anything with the Mage start corners? We are already talking about on the fly placement of the game tiles, why not do the same for the mage and mage stats card. We can start with just two player support or all 6 I was thinking MmNnOo in the creatures dictionary. If you like the idea I will get you the offsets for the card placements. We would need placements for Mage cards, Mage Stats cards, and Play Card face down locations. Also and this is the hard part in my mind, for this to be feasible (and look good) we would have to know which corner the mage is in so we know where to place the cards mentioned above. For example this is how I see a mage in the bottom right hand corner laying out:

bottomright

ACG8 commented 9 years ago

Regarding error handling: sure. Though if a character on the map has no match in the dictionary, currently the game will simply not place anything there, which is not necessarily a bad default.

Regarding autoplacing mages, sure, we can do that. I don't think sensing which corner the mage is in will be very difficult. I don't think we even need to require that the players load a map/spellbook in a particular order; we just put code to place the mages in both the map loading function and the onDeckLoad event.

By the way, it looks like I will be pretty busy this weekend, so I may not have time to help implement these for a while.

sIKE23 commented 9 years ago

The current default is not bad, just thought that it would be nice to say something, but your right if your expecting something to be placed on the board and it doesn't appear then you have been notified.

I will get you the offsets once I get them done. Right now you have made the default placement locations (all 6 of them) a dictionary. If we do this we will have to make it a requirement for at least two mages per map or set default locations and then override them. I am headed to Houston for a day trip. So not much is going to happen today me either.

sIKE23 commented 9 years ago

Here are the offsets based on 250,250 mm tiles.

#Mage Card Placement locations 
MageTopRightOffsetX, MageTopRightOffsetY = 0,0
MageTopLeftOffsetX, MageTopLeftOffsetY  = 188,0
MageBottomRightOffsetX, MageBottomRightOffsetY = 0,168
MageBottomLeftOffsetX, MageBottomLeftOffsetY  = 188,168

#Mage Stats Card Placement locations
MageStatTopRightOffsetX, MageStatTopRightOffsetY = -62,0
MageStatTopLeftOffsetX, MageStatTopLeftOffsetY = 250,0
MageStatBottomRightOffsetX, MageStatBottomRightOffsetY = -62,168
MageStatBottomLeftOffsetX, MageStatBottomLeftOffsetY = 250,168

#playCardFace down default locations
DefaultRightX,DefaultRightY = -62,84
DefaultLeftXDefaultLeftY = 250,84
ACG8 commented 9 years ago

Right. I'll look into implementing that.

ACG8 commented 9 years ago

Wait - do we want players to still manually order their mages placed, or do we want the game to autoplace the mages when all parties have loaded spellbooks? I think the former option would probably be better, and keeps in line with the general principle of giving players control of the game.

Either way, I think I will need to implement zone detection before I can implement this. The easiest way to do this requires that the game know what the board looks like. This is something I need to implement anyway for the attack module.

sIKE23 commented 9 years ago

Right now how this is all handled in playCardFace() function. I have mapped out 6 locations that are assigned by playerNum. The playerNum is decided when a player picks a color. Why do you have to implement zone detection? I thought that we would add MmNnOo to the mapCreaturesDict as: "M" : "Mage 1", "m" : "Mage 2", "N" : "Mage 3", "n" : "Mage 4", "O" : "Mage 5", "o" : "Mage 6"

On the Creature Layer we would require at least M & m on the map (and on edge tiles). You would figure which corner relative to 0,0, that would determine each mage's offset and where they should live in and set the variables and then enhance playCardFaceDown() to place the Mage and Mage Stats card in the proper location along with the default location for playing out cards from the players hands.

I thought that since boards now can be of variable shapes and sizes that it would be impractical to default start locations that could easily land in the middle of a tile or in 1 or 2 tiles in even.

ACG8 commented 9 years ago

I think 1,2,3,4,5,6 would work better as the dictionary keys for the mage starting positions.

sIKE23 commented 9 years ago

Ok :)

I just throw things at the wall to get my thoughts across, you implement it, and I will tweak if need be :).

On Mon, Feb 9, 2015 at 3:28 PM, anandaguneratne notifications@github.com wrote:

I think 1,2,3,4,5,6 would work better as the dictionary keys for the mage starting positions.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-73593880.

ACG8 commented 9 years ago

This OCTGN dev thread is relevant (or will be in the future) to our modular boards:

https://github.com/kellyelton/OCTGN/issues/1377#issuecomment-74107185

sIKE23 commented 9 years ago

Very nice!

sIKE23 commented 9 years ago

For example, if Player 1 loads a Map then Player 2 loads a map, Player 2 will need to take control of the board tiles from player 1 before deleting them....

sIKE23 commented 9 years ago

Load Map 21 with 2 Players, creature placement isn't right

ACG8 commented 9 years ago

Hmm...good point about control of board tiles. I'll see what I can do.

sIKE23 commented 9 years ago

I now think that since you have the zone stuff worked out for regular boards I no longer need to convert each board into cards. Should we just leave Domination tiles and remove the other ones I created?

Next question is how does the zone mapping work? I assume we are all good on the two 3x4 maps, what about the others 6x4, 4x5, 4x4, 2x3, and 3x3.

If you need something like x/y size let me know and I can get them for you. If you look at the setGameBoard#() definitions maybe put the data in there to set the zone boundaries?

ACG8 commented 9 years ago

I think it would be best to remove the non-modular tiles. I'm sorry that so much of your work will be wasted doing this; it is a shame, but I think that aside from the filesize problems, maps are better as images than cards (hopefully the OCTGN dev team will give us the ability to make modular boards without using cards by Q2).

I made a function to define simple maps, so that can be used for zone mapping.

The function is

defineRectangularMap(I,J,tilesize)

Where:

The game assumes that all boards are made up of square tiles, so maps may need to be resized slightly so that all of the tiles are perfect squares (the standard board, at least, was slightly distorted).

Otherwise, just call this function whenever you want to redefine the map.

sIKE23 commented 9 years ago

When we are done testing we can pull the setDRAIP() function and its old calls out of the code

sIKE23 commented 9 years ago

do you think the Tile Cards should stay as their own set.xml file or should they all go in the domination set.xml?

ACG8 commented 9 years ago

I think they should have their own set.xml. Best to keep board tiles and cards separate.

sIKE23 commented 9 years ago

Can we add in another category for Domination?

V'Tar Needed to Win:

sIKE23 commented 9 years ago

We also need to add in a marker section for Orbs, Secret Passage and Spiked Pits

sIKE23 commented 9 years ago

Let me re-phrase my last Hasty Statement. Orbs are already handled so ignore that bit. Spiked Pit is a Special case there is a marker that is placed on this zone at game setup. We need to automate this by adding in the placement of the marker when the tile is placed. This leads to Secret Passage which is also a marker and will need a way of being placed.

I propose we add #markerset1# section. The markers sections would be a bit more special as it would have a bit more logic in the detection code to facilitate the placement of multiple markers in the same zone. So if you have multiple markers to be placed in the same zone you have a #markerset1# and a #markerset2# that would layer the markers and place them properly on the map tile.

If we take this approach we could move the Spiked Pit Marker placement into the Map.txt file.

Once again I think the #markerset1# solution would work well.

ACG8 commented 9 years ago

Why can't we just assume that each zone receives the markers appropriate to that zone? The zones themselves determine which markers they have, so we could just add exceptions for Spiked Pit and Secret Passage, rather than making another section.

I don't know about the V'tar needed to win section. What if players want to adjust the length of the game? I feel like it would be better to let them decide.

sIKE23 commented 9 years ago

I am fine with Zones determining which Markers they get but there is only one Zone like that, Spiked Pit. Secret Passage is just a Marker now and can be placed on any tile.

"V'Tar need to win" is a win condition needed for a given map. Each of the Maps from the Domination has this as a Win condition.On the OCTGN side I was thinking about adding in a I was thinking about adding in logic for the win condition during Upkeep. If we do this, do you think something like:

setGlobalVariable("GameType","1v1") in OnGameStart

and if we load a Domination Map we: setGlobalVariable("GameType","Dom")

Now that makes an assumption that all loaded maps are Domination maps. Not sure how I feel about that.

Long term the GameType variable will allow us to do things like Domination and 2V2 team play....

On Tue, Mar 10, 2015 at 1:22 PM, ACG8 notifications@github.com wrote:

Why can't we just assume that each zone receives the markers appropriate to that zone? The zones themselves determine which markers they have, so we could just add exceptions for Spiked Pit and Secret Passage, rather than making another section.

I don't know about the V'tar needed to win section. What if players want to adjust the length of the game? I feel like it would be better to let them decide.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-78115673.

ACG8 commented 9 years ago

All right, sure. But we should include some way for players to modify the V'tar needed to win for a given map.

sIKE23 commented 9 years ago

So I am thinking it could be #GameType:Dom# and #WinCondition:14# something like that and they would be read into OCTGN GlobalVariables of the same name?

What are your thoughts on the Secret Passage markers. The only reason I am asking is because the 1st Domination map has an Orb and a Secret Passages on the same tiles.....

On Tue, Mar 10, 2015 at 1:47 PM, ACG8 notifications@github.com wrote:

All right, sure. But we should include some way for players to modify the V'tar needed to win for a given map.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-78120710.

ACG8 commented 9 years ago

Yes, I suppose we will need a "Markers" category then.

We don't really need new GlobalVariables; we can just store the game type and the win condition in the dictionary object that contains the map definition.

And best to spell out the scenario: "Domination". No need to be stingy on the characters.

sIKE23 commented 9 years ago

Example then?

On Tue, Mar 10, 2015 at 4:19 PM, ACG8 notifications@github.com wrote:

Yes, I suppose we will need a "Markers" category then.

We don't really need new GlobalVariables; we can just store the game type and the win condition in the dictionary object that contains the map definition.

And best to spell out the scenario: "Domination". No need to be stingy on the characters.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-78150725.

ACG8 commented 9 years ago

Of what?

sIKE23 commented 9 years ago

how the #map# would look

On Tue, Mar 10, 2015 at 4:46 PM, ACG8 notifications@github.com wrote:

Of what?

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-78155359.

sIKE23 commented 9 years ago

you don't have to write the code just the idea of how it would work....

On Tue, Mar 10, 2015 at 4:46 PM, Frederick Czajka fczajka@pobox.com wrote:

how the #map# would look

On Tue, Mar 10, 2015 at 4:46 PM, ACG8 notifications@github.com wrote:

Of what?

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-78155359.

ACG8 commented 9 years ago

Well, like you said, we would just add a section for markers:

....
s..s
....
#Markers#

Then create a dictionary of markers:

{"s":<Secret Passage>}

We should probably not look for #, though, for the values; better to use a new indicator. For instance:

@Scenario=[Domination,9]

(Where 9 can be replaced by the amount of V'tar needed to win; Domination scenarios will result in automatically assuming that V'tar is the goal). If no scenario is specified, it defaults to Standard deathmatch.

So all in all, we would add

....
s..s
....
#Markers#

@Scenario=[Domination,9]

To the txt files when needed, and then would add a couple of lines to handle markers to the loadMap function (I can handle this part).

sIKE23 commented 9 years ago

The maps I am committing will not work until you get these updates done....

ACG8 commented 9 years ago

Yeah, I'll take care of it.

sIKE23 commented 9 years ago

I also put a return statement in on the Load Map function so it doesn't do anything other than notify that it is a New Feature Coming soon.....so if you do any work on this make sure you comment out those two lines.

ACG8 commented 9 years ago

Currently, it looks like orbs and secret passages (and spiked pits) are treated as markers. I think it would be better to treat them as cards, partly in the hopes that we will be able to build modular maps without treating the tiles as cards in the future, partly because it is easier to code, and partly because it will be easier to automate other interactions with them if they are cards. Can you take care of the conversion?

ACG8 commented 9 years ago

Also, do note that the Orb guardian placement on some maps is a bit off.

sIKE23 commented 9 years ago

Create me an issue so I don't forget. ... On May 27, 2015 7:15 PM, "ACG8" notifications@github.com wrote:

Currently, it looks like orbs and secret passages (and spiked pits) are treated as markers. I think it would be better to treat them as cards, partly in the hopes that we will be able to build modular maps without treating the tiles as cards in the future, partly because it is easier to code, and partly because it will be easier to automate other interactions with them if they are cards. Can you take care of the conversion?

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/166#issuecomment-106118831.

ACG8 commented 9 years ago

Okay, the code I just uploaded should take care of object placement, once one last thing is done.

It appears that the set.xml file in the 8c377c82-86af-45ca-ac7c-75230b803532 set folder is not being recognized by the game. At least, none of the GUIDs defined in that file are recognized by the table.create() function. I don't know how to fix this, but I am guessing that you do. One you have fixed this, try loading a map and let me know whether or not it works.