Starfinder Playlist
Page 1 of 3 123 Last
  1. #1

    Changing Token Rotation

    Hey all... I know there was a post asking about this about 2 years ago...

    But is there any way to change the behaviour of the rotation of tokens?

    I'm attempting to create a "Car Wars" for FG2, and I need to change the rotational increments to 15 degrees (I think the current is 45)

    Any possible way to have this lua scripted yet??? Pleeeeze?
    This would make adapting the rules for more rulesets that require counter/tokens to be facing during combat (like ships and firing arcs)
    In Car wars (a Steve Jackson game from the 80's) the cars move and face in 15 degree angles during movements
    ULTIMATE License GM

    IVE BEEN HERE FOREVER!

    Traveller, C&C, Cypher System!

    AKA: ☆𝟚𝟠𝕞𝕞ℝℙ𝔾☆ Youtube

  2. #2
    Would the token frames be of any use:

    https://www.fantasygrounds.com/forum...ad.php?t=15216

    I could see having a token with a frame for each angle of rotation.


    Oh and Car Wars! Let me know when you get it running, I loved playing that game.

    Just don't fail your next Handling roll!

  3. #3
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    To change the default token orientation count you may want to take a look at the following method for an imagecontrol: setTokenOrientationCount( count )

    setTokenOrientationCount sets the number of different token orientations available in the imagecontrol, evenly spread out along a full revolution.

    So for 15 degree angles, try calling the method with a count value of 24 (360/15) in the imagecontrol's onInit() function:

    Code:
    setTokenOrientationCount(24)
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  4. #4
    Awesome, thanks for all of your help. the Frames script as well as the rotation both are very useful.
    ULTIMATE License GM

    IVE BEEN HERE FOREVER!

    Traveller, C&C, Cypher System!

    AKA: ☆𝟚𝟠𝕞𝕞ℝℙ𝔾☆ Youtube

  5. #5
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,370
    The rulesets (4E and SWEX at least) support hex maps, so along with the image rotation code is a bunch of other "non-square gird" mathematics (distance measuring etc...) and tricks all in the same file. Worth a look.

    Car Wars, eh ? Would love to see a copy of that in action ! It's another one of those "used to play all the time, 20 years ago, when I had more time and nearby gamer friends" games that NEEDS a good internet engine behind it. Esp. as it had a lot of fiddlyness of rules that could be nicely streamlined inside FGII.

    Would love to see what comes of this, even help out a little if your interested ?
    Former SW ruleset / Deadlands extension author. Now I just wanna play a few games. And maybe hack. A little.

  6. #6
    Sorry for the dumb question, I dont have a clue on ruleset but I am trying to modify/include that token rotation finer control into the foundation ruleset, what file should I look for? I am guessing this is already defined somewhere...

  7. #7
    The function that controls the number of points on the token rotation is called setTokenOrientationCount. You can search through the existing ruleset files to find the places where it is set. (8 = standard square grid, 12 = standard hex grid)

    Cheers,
    JPG

  8. #8
    Thx! I found it now using the exact string :-)... the search tool I was using didnt work well.

  9. #9

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,394
    The DOS console "find" command it very good for this type of thing, where you are looking for a string but have no idea what file it is. You can search the whole directory easily. Usually I'll search the whole directory with the /c command and then when I find the files with more than 0 count I'll search each file again with the /n option to get the line numbers in the file where they are. Here's a link to the syntex: https://www.computerhope.com/findhlp.htm

    Note despite the name these commands are work in all versions of Windows after Win3X. You just have to open a console window and it's easiest to do that in the directory you want to search.

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Another great way to find what you're looking for across multiple files is the "Find in files" functionality in a number of text editors. A few people on these forums use Notepad++ (a GPL multiple-document text editor with text highlighting for LUA and XML files and xml plugins) which has this search in files facility. The search result window even allows you to double-click on the specific result and it will open up the relevant document - at the line which you clicked on. Very, very handy for tracking down where FG functionality is coded and referenced.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Log in

Log in