User Tag List

Results 1 to 8 of 8

Thread: Automate a special letters to numbers conversion process with Fusion

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Automate a special letters to numbers conversion process with Fusion

    Imagine that I have 3 words with 5 letters and I manually convert the letters into a 15-digit number by applying 5 different operations.
    I need help with 2 operations, so that I can create a one-click generator - for example just type three words with 5 letters(ravenhorsetiger) and get a 15-digit number as result(639864918660971).
    These are my rules (1)-(5) on how I manually get the 15-digit number from the words.


    My problem is that I don't know how to do step (2) and (3), especially step (2).
    start with: R E G I T    E S R O H    N E V A R → step 2: E N R S E    E R V G O    A I H R T → step 3: F M S R F    D S U H P    Z J I Q U

    Please share your ideas and tips here. Thanks in advance!
    ______________________________________________


    R A V E N H O R S E T I G E R


    (1) reverse order left-to-right:

    R A V E N    H O R S E    T I G E R
    R E G I T    E S R O H    N E V A R


    (2) resort letters with the following rule:

    - 1st letter of word 2 is new letter 1
    - 1st letter of word 3 is new letter 2
    - 1st letter of word 1 is new letter 3
    - 2nd letter of word 2 is new letter 4
    - 2nd letter of word 3 is new letter 5
    - 2nd letter of word 1 is new letter 6
    ...
    - last letter of word 1 is new letter 15

    R E G I T    E S R O H    N E V A R
    E N R S E    E R V G O    A I H R T


    (3) replace letters with the following rules:

    - 1st letter E goes to next letter after E in alphabet: F
    - 2nd letter N goes to previous letter before N in alphabet: M
    - 3rd letter R goes to next letter after R in alphabet: S
    ...
    (right-to-left, for the 1st letter always start with next letter in alphabet, then for every new letter previous, next, previous, next ...)
    - if a letter is A, the previous letter is Z
    - if a letter is Z, the next letter is A

    E N R S E    E R V G O    A I H R T
    F M S R F    D S U H P    Z J I Q U


    (4) convert letters into numbers - A is 1 B is 2 Z is 26:

    6 13 19 18 6 4 19 21 8 16 26 10 9 17 21


    (5) skip first digit if there are 2

    6 3 9 8 6 4 9 1 8 6 6 0 9 7 1

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sounds like a fun puzzle, I'm up for the challenge. Hopefully I can get something for you within the hour.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Wow - thanks for your help again, Sumo!

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here you go, Wodjanoi! It was a lot of fun trying to figure out your puzzle. You actually made a slight mistake when switching the letters from left to right:

    E N R S E    E R V G O    A I H R T
    F M S R F    D S U H N    B H I Q U

    On the last letter of the second word, you didnt switch to left and went right twice, so the rest of the string is a bit messed up. You explained your thought process well enough though so I understood what you wanted.


    All you need to do to add this to your program/game is to copy the "Code Conversion Widget" active object and the string parser 2 object. I made sure the string parser 2 object was compatible with all the runtimes so you shouldn't have a problem with it. All the variables are contained within the widget object so you don't need to copy any of the strings on the screen, those are just for show. You can retrieve the code conversion strings at every step of the process, they're stored within the alterable strings of the widget object.
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    That's a great example, Sumo. Thanks a ton! Sorry for my mistakes - Well, now with your example, I don't have to care about mistakes any longer.
    Everything is working properly with small letters and spaces between the words and that's fine!
    I noticed one little problem though - sometimes it's only a 14-digit number or even less numbers, because 0 is missing under certain conditions.
    Put paper glass steel into the textbox for example and you will notice, that 0 is missing or try tzrue fhgdw ehwne.

    Nevermind - you already fixed it.
    Thanks again!

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I made a few more tweaks, so I think this should work now. I moved all the code into a behavior too, so the code is contained within the active object widget. Let me know if you find anymore bugs.

    Some of the zeroes were missing because they were at the start of the number phrase and Fusion deemed the 0 unnecessary since I stored it in an alterable value. I switched it to an alterable string to keep the zeroes from dropping.
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)

    Join Date
    May 2016
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with your code

    Quote Originally Posted by Sumo View Post
    I made a few more tweaks, so I think this should work now. I moved all the code into a behavior too, so the code is contained within the active object widget. Let me know if you find anymore bugs.

    Some of the zeroes were missing because they were at the start of the number phrase and Fusion deemed the 0 unnecessary since I stored it in an alterable value. I switched it to an alterable string to keep the zeroes from dropping.
    I know this is an old thread but how could I convert the numbers back into the string?

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    vladimirdabic's Avatar
    Join Date
    Jul 2016
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't precisely as the first digit is ignored. You can always take a guess but then you'd have to guess for each number.

Similar Threads

  1. Replies: 12
    Last Post: 18th January 2016, 09:58 PM
  2. Conversion sur fusion 2.5
    By coyote in forum Fusion 2.5
    Replies: 4
    Last Post: 9th March 2015, 01:18 PM
  3. Replacing numbers with letters
    By Decal in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 24th November 2010, 08:34 PM
  4. Replacing numbers with letters:FILE:
    By Decal in forum File Archive
    Replies: 0
    Last Post: 23rd November 2010, 08:43 PM
  5. unknown letters and numbers compare two vals?
    By bubba_damage in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 8th October 2010, 10:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •