Professor Nader "Welcome to the URealms Forums! Please make sure to read the rules before posting!
Your posting ability may be restricted for the first 24 hours!"

Character Creation Scripting (Updated June 14th, now no duplicates)

The Script can be found [Here]


Actually setting up a character creation can be a tedious process of having to drag cards out of the right deck to the right places, dozens of times over. So I put an evenings worth of work into automating the process.

Features:
  • Deal cards to specific players
  • Deal cards to all players
  • Only deals to empty slots
  • Got duplicates? Put the duplicates back and let it fill in the holes. No more mess.
  • Automatically set up class abilities
  • Shuffle decks when dealing
  • NEW! Each player won't get duplicates of any particular card

Why this script over others?
  • Easy installation, copy and paste one script and you are done
  • Per-row layout, if you are playing with less than a full table
  • Only deal to empty slots (Remove anything you don't want and re-deal to fill in the holes)
  • Automatic class card setup - Expand out class cards automatically when a card is dropped into the slot
  • Duplicate surpression

Installation:

  1. Open URealms Character Creation from the workshop
  2. Pull up "Scripting" at the top of your tabletop simulator window
  3. Paste the script over the existing content of "Global"
  4. Hit "Save & Play", although it may throw an error, the buttons should still show up
  5. With any luck, Tabletop simulator should have created the proper buttons and associations
The Script can be found [Here]

I'm open to suggestions on layout or if I can improve automation, or for any other features people may need. Auto-duplicate removal? Maybe expand out class cards? I'm open for suggestions.

"This work falls under the CC BY 4.0 License and can be used and edited freely as long as you provide credit!"

Comments

  • ooo very handy! nice job  :)
  • This is awesome!
  • Amazing job man!. 
  • @Corilyn Hey, there is a slight problem with it. As you lock the decks for use, because of you filling it, you cannot shuffle the decks when pressing R. You need to rightclick on the decks individually and press Shuffle. Dunno if you can do anything about that
  • Awesome dude. Funny enough we were looking into adding this ourselves, but never got around to it. I'll mess with it today and even add it to the base mod if it works well.
  • Bless your soul, good person.
  • wow, nice job :)
  • Hm, maybe an All Shuffle Feature? Were you shuffle all the decks at once
  • Other than that this thing is GREAT! Thank you a lot friend!
  • edited June 2017
    Ya'll just need a big button above the class card shop that just deals every card. Race, class, and all shop cards. This would make life perfect. and yeah, get rid of the deck locking. I did it in my version of the save, and I didn't notice anything bad. I would also like the buttons to maybe be white with black lettering? The board is kinda dark and a white button might give a better contrast. I'd also be nice if the UI buttons lined up with the decks so everything is in a line and no off center. Also a shuffle button to shuffle all the cards including the ones off to the side if possible.
  • I would love a feature to auto-remove duplicates if that would be possible somehow.

    Also expanding the class-cards sounds neat, I still have no idea how to do that with the base-mod. 
  • @Maxell Oh yikes, I did miss that one. Oddly I had shuffling the decks commented out for testing, I have updated the script so it will shuffle the decks when it draws. 

    @Rob Haha, awesome! drop me a line if you have any issues, I'll be glad to help.
  • @Corilyn Holy crap this is exactly what I wanted for the tabletop mod!

    @Rob I don't have to set it up myself? This fourm can't get any better for me!  :)
  • This is pretty cool, well done! :smileporc: 
  • It looks to me that you didn't account for doubles in every deal option, or at least it happens to me that some people get doubles of a card. Not sure if it's only me or everyone though.
    Still mad respect for putting in that work and other than that it works fantastic.
    (I don't want to be evil here just wanting to help...)
  • @Rovesul

    The actual decks contain a bunch of duplicates, you'll naturally end up with a bunch when you deal normally. With my setup though, at-least you can remove the duplicates and hit deal again, and it will put new cards in the empty slots. 
  • Never saw it like that @Corilyn sry. I just thought you could detect which cards were already dealt to a person and prevent the dealing of the same card to this person. But yes this works as well.

  • Added in character ability card support, just drop any class card into the abilities slot and it will deal out the respective ability cards to the correct slots.Please tell me if you can find any issue with this!

    Also fixed the link to resolve the shuffling issue, the first update to the link didn't take.
  • @Corilyn Question - is there a way to make each different row(each player's shop and class, etc) different? If so can you please so that? Anyways this is a really cool thing you're doing!
  • @CasualCow ;
    That should be how it works by default?
  • @Corilyn Why is it that you lock all the decks in loadup, about what unwanted interactions are you talking about in you commentation?
  • @Rovesul ;
    The buttons are anchored off of the respective decks, turns out, you can pick up an object by clicking on the edge of a button? There is an alternate scheme where you can create a scripting zone and attach stuff directly to it, but that requires save editing to setup.
  • @Corilyn I didn't notice the update, it works now! This is a very cool add-on. Thanks for your work dude!
  • Ah!  I didn't think to anchor the buttons right off the locked title plates!  Very nice.  Love seeing everyone working on this and sharing their creations.  It definitely teaches me a lot as I pick up more scripting.
  • @Xaintrix ;
    Ha, I wish it was that easy! The title plates are part of the base image, and to make it readily add-able I kept everything in global, so the buttons lower on the screen are anchored off the respective decks. 
  • Really hoping they add this into the base mod, this is awesome
  • Updated:
    Animation when expanding class abilities should be cleaner
    Code is shorter (Was reaching the limit for what could be pasted into TTS)
    NEW! When dealing to a players slots, if it would deal a duplicate, it will shuffle it back into the deck and draw again until it finds a non-duplicate
    Removed the debug message when first loaded

    As Always, comments and suggestions are appreciated, hopefully it's in a state where @Rob may add it to the base mod? 


  • @Corilyn I absolutley love this mod, thank you so much for taking the time to write this script for us <3
  • I know this is a super old thread, but an update came out today that broke the script (see here) and I'm not familiar with lua/the tabletop scripting language so I was unable to find the problem.
Sign In or Register to comment.