Monopoly Help
Jun 14 2008, 5:25 pm
By: fritfrat  

Jun 14 2008, 5:25 pm fritfrat Post #1



I was posting because as I get closer to completing the BETA for Monopoly, I am stuck on trying to figure out a more efficient way to do the Commmunity Chest and Chance cards. This is what I came up with, keeping in mind there are actually 16 cards in each deck.. this is just for 1 deck (chance), and this doesn't include get out of jail free, since it has its own override into the circulation.

Randomize 4 switches, assign 16 different units(Card1-Card16) a death number 1-16 (16 triggers + a few more) for player 8. This isn't instantaneous and is done at the start.
When someone lands on a chance, set deaths of current player to 1-15, adding one each time (15 triggers). (For example, if deaths = 2 for player 8, set to 3 for current player and player 8).
If death of Card1 = 1 (through 16) for player 8 and current player suffers 1 (through 15) death, do effect of card 1. (15x16 = 240 triggers -.o)

Assuming the get out of jail free cards have 20 triggers each or so, that would be almost 300 triggers per deck, making it 600 total. I don't think it'd take too ridiculously long because of replace all functions, but seriously, does anyone have a better idea than this? Thanks ahead of time for your input.

As far as progress goes, all I have left to do are cards, mortgaging, some more turn-control concerning trades, and bankruptcy.. once the first 3 are done I'll release the BETA to test out all of this stuff I've been triggering :)

Post has been edited 3 time(s), last time on Jun 14 2008, 6:37 pm by fritfrat.



None.

Jun 14 2008, 7:18 pm Optics Post #2



Is it supposed to be pure random? If so you could simply use a set of randomized switches.

Trigger
Players

  • Some player
  • Conditions

  • Always
  • Actions

  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Preserve Trigger



  • Trigger
    Players

  • Some player
  • Conditions

  • Switch 1 is set
  • Switch 2 is set
  • Switch 3 is set
  • Player has suffered exactly 0 deaths of no card
  • Actions

  • Do effects of card 1
  • Set deaths of Player has a card to 1



  • And so on. Your next trigger would say Switch 1 is set, but 2 and 3 are cleared. And so on and so on. More switches = more combinations. At the beginning of a players turn make sure to set Deaths of card back to 0 in case they land on a card space. I'm not sure if this is what you wanted or not as your post was a little unclear, but this to me seems like it'd work as each time a player landed on a card space they'd be given a random card which is really all you need to do with a chance card anyway right?



    None.

    Jun 14 2008, 7:42 pm Clokr_ Post #3



    Using death counters to keep track of the order of the cards is a bad idea. Use units instead. I can get an algorithm which shuffles a line of units using 1 or 2 locations, 3-4 triggers and ~3 players. I think I can also get one algorithm that draws a card using 3-4 triggers, the same locations and ~2 players.

    Actually I might make a demo map of the system later if I have some free time :)

    EDIT: Optics your method doesn't work because you could get the same card 99999 times in a row...

    Post has been edited 1 time(s), last time on Jun 14 2008, 7:56 pm by Clokr_.



    ?????

    Jun 14 2008, 7:50 pm Conspiracy Post #4



    Optics, that would work, but what I think frit is trying to do is to simulate shuffling the deck.

    Which how he has it would be simplest way to simulate shuffling. Your way would be the simplest all around.



    None.

    Jun 14 2008, 9:23 pm Optics Post #5



    Well, in Monpoly isn't there more then 1 card in a deck anyway? If not you could add a very simple death counter system to prevent a player from getting the same card twice. Just a matter of adding 1 more action and 1 more condition per trigger.

    Even if he wants to shuffle a deck that method would still work rather well - all you have to do is implement a simple death counter to keep track of which cards have been already used. If death count of "Command center" = 1 then DON'T give the player this card, in other words. If death count = 0, proceed - and set death count to 1. Then once every card has been given, reset all death counts back to 0. With hyper triggers on it'll just keep going through the combinations until the switches are set to the right combination AND the card hasn't already appeared within milliseconds. It'd be a much easier way of multi manging chance cards then having to keep track of all the elaborate stuff mentioned in the original post. Either way it's only a suggestion this sort of thing can be done any number of ways.



    None.

    Jun 14 2008, 11:24 pm fritfrat Post #6



    I'm sorry, I keep on forgetting that people don't know monopoly as well as I do after spending so much time on it. In Monopoly, you shuffle the decks in the beginning of the game, but after using a card, you put it back onto the bottom of the deck so it does not appear until all other cards have shown up (give or take the get out of jail free card, which is obviously taken out of the rotation). Because of this, the way Optics suggested would work for the first run through but then the order would change for the second time, which wouldn't fit into the rules of Monopoly. Thanks a ton for your input, though, as all of it helps me be more open minded.

    I agree with Clokr that the easiest way would be a line of units. I first threw the idea out because I didn't have any unused units or space, but I after more consideration resulting from Clokr's post, I could just use 16 different locations on null terrain and represent each card with a certain number of burrowed units; 1 burrowed unit is the first card, 2 burrowed units is the second card, etc. I could use less locations, but I've been conserving like crazy and have over 80 remaining with not much left to do, so I'll just use 16. So, this would take..
    2 triggers for randomization/stopping randomization (could be done in 1, but it takes less time to use 2).
    16 triggers for creation of each individual "card," represented by number of burrowed units 1-16 (adding to a total of 136 units per deck).
    16 triggers triggering the effect of each card and putting it back at the end of the line, +1 more action in my "use get out of jail free" triggers I already made.
    32 triggers per deck, so 64+2=66 triggers total. Yay.

    I almost feel silly I didn't think of it earlier. I guess sometimes it's easy to get close-minded about how you do things :). Thanks for all your help, and I'll leave the topic open in-case anyone catches a theoretical flaw in the system I proposed off clokr's suggestion.

    Post has been edited 1 time(s), last time on Jun 14 2008, 11:31 pm by fritfrat.



    None.

    Jun 15 2008, 12:16 am Clokr_ Post #7



    In case you want to take a look I'm gonna attach the demo map. Shuffles the deck using 7 triggers, 3 locs, 3 comp players and no burrowed units. If you unroll the loop (copy several times the triggers that loop the process) you can speed it up x2, x3, x4... etc.
    Shift right can still be optimized, I'll do that tomorrow (although you won't probably need that.

    EDIT: Actually if you have no unit space left that method might not work for you. Still I believe it can be easily modified to work with burrowed units. You should take a look at it.

    Attachments:
    DeckAlgorithm.scm
    Hits: 1 Size: 40.89kb



    ?????

    Jun 15 2008, 12:46 am fritfrat Post #8



    The shuffling is really neat, but I'd like to stick with a completely-random way of shuffling. Your way of shifting left I would use, too, but I have tons of locations I haven't even touched and know I won't use, so I may as well just use them and save risk for error. Thanks again, clokr :)



    None.

    Jun 15 2008, 12:50 am Clokr_ Post #9



    It is pretty random. Not sure how much though. I should make a program that shuffles an array using that algorithm and check if the result is completely random or not :P



    ?????

    Jun 15 2008, 12:52 am fritfrat Post #10



    I ran it in the game, and it's easy to visualize how the last slot will always be the 2nd or 3rd to last slot, and the second to last slot will always be either the 1st-5th, etc.

    That would be really cool, though, if you can code this.. the exact percentages for each spot for 16 items after x number of shufflings for x= {1,2,3,4,5}. I wish I knew how to do stuff like that!



    None.

    Jun 15 2008, 4:00 am Optics Post #11



    Quote from fritfrat
    I'm sorry, I keep on forgetting that people don't know monopoly as well as I do after spending so much time on it. In Monopoly, you shuffle the decks in the beginning of the game, but after using a card, you put it back onto the bottom of the deck so it does not appear until all other cards have shown up (give or take the get out of jail free card, which is obviously taken out of the rotation). Because of this, the way Optics suggested would work for the first run through but then the order would change for the second time, which wouldn't fit into the rules of Monopoly. Thanks a ton for your input, though, as all of it helps me be more open minded.

    I agree with Clokr that the easiest way would be a line of units. I first threw the idea out because I didn't have any unused units or space, but I after more consideration resulting from Clokr's post, I could just use 16 different locations on null terrain and represent each card with a certain number of burrowed units; 1 burrowed unit is the first card, 2 burrowed units is the second card, etc. I could use less locations, but I've been conserving like crazy and have over 80 remaining with not much left to do, so I'll just use 16. So, this would take..
    2 triggers for randomization/stopping randomization (could be done in 1, but it takes less time to use 2).
    16 triggers for creation of each individual "card," represented by number of burrowed units 1-16 (adding to a total of 136 units per deck).
    16 triggers triggering the effect of each card and putting it back at the end of the line, +1 more action in my "use get out of jail free" triggers I already made.
    32 triggers per deck, so 64+2=66 triggers total. Yay.

    I almost feel silly I didn't think of it earlier. I guess sometimes it's easy to get close-minded about how you do things :). Thanks for all your help, and I'll leave the topic open in-case anyone catches a theoretical flaw in the system I proposed off clokr's suggestion.

    Ah okay, sorry about that I got a little confused reading your orginal post since I didn't know the game that well. I've only played it a couple of times. Seems like you've got it figured out though.. just post again if you need some more help and i'll try my best to keep up next time. :D



    None.

    Jun 15 2008, 10:23 pm Clokr_ Post #12



    Quote from fritfrat
    I ran it in the game, and it's easy to visualize how the last slot will always be the 2nd or 3rd to last slot, and the second to last slot will always be either the 1st-5th, etc.

    That would be really cool, though, if you can code this.. the exact percentages for each spot for 16 items after x number of shufflings for x= {1,2,3,4,5}. I wish I knew how to do stuff like that!

    I have not have time to finish the new version of the map because I've spent the whole day studying for finals, but if give a 0.5 chance to swap every possible pair of units twice (1 with 1, 1 with 2, ..., 1 with 16, 2 with 1, 2 with 2, ..., 2 with 16, ..., 16 with 1, 16 with 2, ..., 16 with 16) the result is a perfectly shuffled deck. I've used a program to verify it and the shuffling works well. I'll attach the new version of the map whenever I have it finished.



    ?????

    Sep 1 2018, 12:18 pm MaximusDecimus Post #13



    Hi Fritfrat,

    I got to your contact by the credits in the classic Starcraft 1: Monopoly Map. The map was still in play 10 years after you created probably in 2008. And it's one of the map that i like and popular among some players.

    However, there was an issue with the map that spoilt the fun in the map. That is, some players out of rage in losing or failed trade negotiation, refuse to roll their dice when it their turn (this is termed by me as Rage AFK). The purpose is to prevent the winner from winning, a poor act of sportmanship.

    Based on feedback from some players, I was hoping you will release a simple update that set a timer for each player turn. This should prevent losers from exploiting the map. I can help to promote and distribute your new version to the players of SC 1 in Bnet (US server).

    Hope to hear from you. Thanks!

    - 1 Sept 2018



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [07:24 am]
    Kolokol -- LOTC was still 2 years ahead
    [07:24 am]
    Kolokol -- Halo: Fall of Reach came out in 2001
    [07:24 am]
    Kolokol -- Legacy of the Confederation was made in 1999
    [05:00 am]
    KrayZee -- Leap of Faith Day 2020
    [08:03 pm]
    Moose -- Doc Halsey probs in Halo books well before Reach came out
    [03:57 pm]
    lil-Inferno -- probs just coincidence tbh
    [2020-2-27. : 5:45 am]
    Kolokol -- Okay, are both of these games referencing something else here? If so, what are they both referencing?
    [2020-2-27. : 5:45 am]
    Kolokol -- So I am looking at the custom campaign "Legacy of the Confederation". One of the missions has references such as "Doctor Halsey" and "Noble", but the campaign was made almost 10 years before Halo Reach.
    [2020-2-27. : 2:55 am]
    Dem0n -- ya
    [2020-2-27. : 2:45 am]
    Wing Zero -- Ah damn it Demon
    Please log in to shout.


    Members Online: guadalupeingram