Snakes and ladders GuideMe tease generator

Webteases are great, but what if you're in the mood for a slightly more immersive experience? Chat about Tease AI and other offline tease software.

Moderator: 1885

Post Reply
medvidek
Curious Newbie
Curious Newbie
Posts: 3
Joined: Tue Jan 05, 2016 9:25 pm

Snakes and ladders GuideMe tease generator

Post by medvidek »

I noticed there are quite a few snake and ladders teases released recently and i noticed that they are easily created. So i made i generator for them. It's script written in Python 2 and all you have to do is to run the gen and place images you want each page to have in a folder.

The generator is quite simple. You can easily edit how many pages should the game have (100 is default), how many of that are ladders and how many snakes which means how easy or hard the tease will be. You can also change some minor stuff like how far can snakes or ladders bring you or if they can chain (ladder/snake leading directly to another ladder or snake).

Some other detailed semi-dev info:
Spoiler: show
- When you run the script there is string written in console which shows the level. Each normal field is dash symbol (-), every snake is exclamation mark (!) and ladder is right arrow (>). So by looking at it you get basic idea how the tease looks like. If you don't like it you can just run it again to generate new tease.
- The script checks if the tease is valid. Valid tease always starts and ends with normal field (no snake or ladder at first/last field) and its always doable (you cannot get tease where there are six and more snakes after each other - you couldnt get over those even if you rolled six!)
The generated tease is pretty simple. Dice rolling is automatic so there is always just 1 button. There is always a number on every page which denotes what page are you on. Also if you hit ladder or snake page it says so with info where does the snake/ladder lead to. Apart from that there is nothing more. No metromomes, timers or anything.

So here is what you have to do to generate your very own snakes and ladders tease:
  • Get Python 2 here
  • Download the script to generate the tease here
  • Run the script (either by double clicking or opening command line, enter folder with the script and then run it by typing "py gen.py")
  • In the folder where your script is there should be new file created called "ladders.xml", that is your generated tease
  • Create a new folder in the same folder called "imgs" and place there images in format N.jpg where N is 0, 1, 2, 3 ...., 11, 12... etc. each number for 1 page in your tease (notice it starts from 0! the pages in tease are moved by 1 so page 5 displays on page 6.)
  • Load the ladders.xml to GuideMe and enjoy
The script is very basic, you can edit it to your liking. Feel free to share your created teases or modified script here but please dont spread this script to other websited or forums :)

Edit: As a bonus include python script which renames all *.jpg images in same folder where its ran to N.jpg where N is 0, 1, 2.. The images are shuffled in proccess! So just download all images you want into "imgs" folder, place there this script and run it. They will be shuffled and named to be accepted by the tease ;) You can download it here or here.

Edit 2: Scripts updated. Links in post updated to reflect it. Changelog:
Spoiler: show
- Forced python 2 by #!python2
- Ladders and snakes max length separated
- Added option to include "Edge" button. The idea is that when you edge, click this button and you will be moved back by preset number of fields as a penalty you couldn't hold back.
- Fixed error when max length of snaked aor ladders was set 0
- KNOWN ISSUE: If you have "can_chain" set to True it is possible to have enless loop of snakes and ladders created.
Last edited by medvidek on Wed Nov 09, 2016 7:59 pm, edited 2 times in total.
User avatar
Shadowbro
Explorer
Explorer
Posts: 12
Joined: Sun May 31, 2015 4:14 am
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive

Re: Snakes and ladders GuideMe tease generator

Post by Shadowbro »

Hi, I don't know if I'm doing something wrong or not, but when I tried to run the script it said there were missing parentheses around two prints here
Spoiler: show
<Image id="'''+str(page)+'''.jpg" />
<Button target="p'''+str(t)+'''">Follow ladder</Button>
</Page>
''')
sys.stdout.write(">")
sys.stdout.flush()
print ''
and here
Spoiler: show
# Generate array of game fields
if pages <= 0 or ladders + snakes >= pages:
print 'Too few pages or too much snakes/ladders.'
exit()
I fixed that, but then when I tried to run it again it says this.
Spoiler: show
================ RESTART: C:\Users\Brodie\Desktop\test\gen.py ================
Traceback (most recent call last):
File "C:\Users\Brodie\Desktop\test\gen.py", line 48, in <module>
if get_target(fields, page) == -1:
File "C:\Users\Brodie\Desktop\test\gen.py", line 17, in get_target
adepts = range(page-max_distance, page-1) + range(page+1, page+max_distance)
TypeError: unsupported operand type(s) for +: 'range' and 'range'
>>>
medvidek
Curious Newbie
Curious Newbie
Posts: 3
Joined: Tue Jan 05, 2016 9:25 pm

Re: Snakes and ladders GuideMe tease generator

Post by medvidek »

I think it's happening because you also have python 3 installed and your computer is trying to run the script with python 3 instead of python 2. To fix this try you can either put

Code: Select all

#!python2
as the very first line of the script, or run it from console like this:

Code: Select all

py -2 gen.py
That should help. Also revert the changes you made (parentheses around print argument) or it might not work with python 2 ;-)
e-stim_junkie
Explorer
Explorer
Posts: 20
Joined: Sat May 30, 2015 1:14 pm

Re: Snakes and ladders GuideMe tease generator

Post by e-stim_junkie »

I'd like to add text to the generated xml script. Which area is for the text on the side that the Hentai mix has on the right side?

<Page id="p0">
<Text>
<p>1</p>
</Text>
<Image id="0.jpg" />
<Button target="p0">Edged</Button>
<Button target="p(1..6)">Next</Button>
</Page>

I'm guessing "Text" but not familiar with xml.

Thanks
philo
Explorer At Heart
Explorer At Heart
Posts: 831
Joined: Sun Jan 08, 2012 3:10 pm
Gender: Male
Sexual Orientation: Straight
Location: UK

Re: Snakes and ladders GuideMe tease generator

Post by philo »

e-stim_junkie wrote:I'd like to add text to the generated xml script. Which area is for the text on the side that the Hentai mix has on the right side?

<Page id="p0">
<Text>
<p>1</p>
</Text>
<Image id="0.jpg" />
<Button target="p0">Edged</Button>
<Button target="p(1..6)">Next</Button>
</Page>

I'm guessing "Text" but not familiar with xml.

Thanks
it is generating guideme xml the documentation for it is here https://github.com/philormand/TeaseMeV2/wiki/XML-Nodes
Text will ďisplay on the right, LeftText would display on the left instead of an image.
You can format text using html but be aware that it needs to be stored as xml, so the tags need to be done properly.
<br> on it's own would not work, it would need to be <br/> or <br></br>
e-stim_junkie
Explorer
Explorer
Posts: 20
Joined: Sat May 30, 2015 1:14 pm

Re: Snakes and ladders GuideMe tease generator

Post by e-stim_junkie »

Thanks, I'll dig into it a bit if I can find the time this weekend. Work + school + etc. leaves almost no time anymore. :-/
User avatar
meowww
Explorer At Heart
Explorer At Heart
Posts: 137
Joined: Mon Jan 18, 2016 10:56 pm

Re: Snakes and ladders GuideMe tease generator

Post by meowww »

Welp looks like the Links are down, is there a chance that any one still hast this and would be so nice to upload it?
medvidek
Curious Newbie
Curious Newbie
Posts: 3
Joined: Tue Jan 05, 2016 9:25 pm

Re: Snakes and ladders GuideMe tease generator

Post by medvidek »

Sorry, i reuploaded the script

Code: Select all

https://mega.nz/#!Dkx2hAaJ!eTCQchDtGSLTnyVzqI2t0PjF9Msu8hprMrbLN2jeG-Y
Also i made a small addition - "edge" button which will return you x pages back (10 by default, modifiable at the beginning of the script). It can also be hidden (by setting one of the variables at beginning to False)
Post Reply

Who is online

Users browsing this forum: shadshad and 34 guests