5E Character Create Playlist
Page 1 of 2 12 Last
  1. #1
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    27,032
    Blog Entries
    1

    Basic Extension Coding Tutorial Session

    Hi Guys,

    Here is the video link from my Basic Extension Coding Tutorial Session at FG Con 12.

    **New Link**
    https://youtu.be/R_CulFJYs-M
    Three additional videos:
    nine slices https://youtu.be/ZLM0qMsNybg
    extending an extension https://youtu.be/x4leZBomtOc
    5e character sheet https://youtu.be/UPKJDwUt554

    Tip reminders

    Tools
    Notepad++ or another code editor that supports find in files
    7zip for compressing/uncompressing files (it recognises .pak/.mod/.ext/.ppk as .zip files – don’t use .7z compression – only .zip)

    Fantasy Grounds
    Copy the following to your hotkeys:
    /reload
    /console
    /save
    And a link to whatever you are working on

    Debug
    Debug.console();
    Debug.chat();
    Use them often.

    File Structure
    Mimic the CoreRPG/5e folder structure, file naming conventions and separation of strings and layout and templates and scripts etc…
    The only required file is extension.xml
    LUA code should be in .lua files so that the error reporting can identify the line that the error occurs on

    Anchoring
    Learn it!

    Finding the Right Files
    Find a unique or rare keyword on the page that you want to edit and search on that.
    Follow templates and strings and icons etc etc (using FiF) to learn how these things link to each other
    Use the merge=”” so as to minimise the amount of code that may be affected by upgrades

    Packing Extensions
    You don’t need to pack your extension up each time you make a change – do all your dev with unpacked files
    When zipping the final product up – don’t include the parent folder. Include the files and folders at the same level as extension.xml and everything below.
    Make sure you don’t end up with a filename like – myextension.ext.zip – it wont work!

  2. #2
    when doing an announcement, you don't require both
    Code:
    \r\n
    for a new line with FG.

    Code:
    \r
    is all you need, or just make more announcements or both.

    Code:
    	<announcement text="Fantasy Grounds College Custom Theme" font="emotefont" icon="fgc_decal_logo" />
    	<announcement text="Includes: 5E Font - 14 point Clear Font and MOTD by Trenloe.\r https://www.fantasygroundscollege.net fantasygroundscollege.net" font="emotefont" />
    screenshot0010.png
    Last edited by shadzar; April 17th, 2018 at 20:09. Reason: content no longer needed.

  3. #3

  4. #4
    Thanks for posting and doing this for the community. Good stuff.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset FGU Reference Module, or Web.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  5. #5
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,101
    Ditto my thanks for doing this!

    I’m watching it on my commute to work in this gods-blasted rainstorm so thank you for giving me SOMETHING to enjoy this morning.

    Btw, I’m totally a noob, my son wants to make videos... what software do you or folks use to record that sort of screen/window presentation? (also anyone interested, check out Humble Bundle for a great $20 deal on Vegas 14 (current is 15) )

  6. #6
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    27,032
    Blog Entries
    1
    Quote Originally Posted by Varsuuk View Post
    Ditto my thanks for doing this!

    I’m watching it on my commute to work in this gods-blasted rainstorm so thank you for giving me SOMETHING to enjoy this morning.

    Btw, I’m totally a noob, my son wants to make videos... what software do you or folks use to record that sort of screen/window presentation? (also anyone interested, check out Humble Bundle for a great $20 deal on Vegas 14 (current is 15) )
    I used Camtasia but it really doesnt matter what you use - no one is doing anything too complex.

  7. #7
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,101
    Just finished on my commute back. Great, intro to writing extensions.
    You asked for ideas during the session. I think yourself or some folks could do worse than a “control showcase”, demo various vanilla controls and common usage for beginners. Show one of them slightly customized. Show one with rollable with simple chat box print, etc

    Part two maybe some sort of primer on placement tricks/anchoring... Definitely teach the Sacred Square of Super Siding! (yeah, coming up with snazzy advertising names is NOT one of my strengths)

    My biggest complaint (after wanting more 8) ) was that you are too self-effacing! Seriously, with the amount of help you give, MoreCore and all your help troubleshooting ... you should strut a bit more is all ahm sayin’


    One thing I THINK I’d do (think because as you know I am still only xml-ing) is set up a local set of 6 vars repping each ability like, lastStrMod etc. Then each time through the if chain you update that with 1 or 2 or 0 based 9n the example you had. while this adds a bunch of repetitive assigns (as I write thinking of a func I’d do if supported, will come back to that after I load your extension) it also gives one nice decoupling effect: No matter if you rearrange the order of the cycling titles or add/remove them - you won’t have to be careful to pay attention explicitly to prior value. It just works.

    It is a trivial “improvement” (maybe haven’t seen it implemented to compare +-) but I like that keeping knowledge of self vs state transitions outside of self.

  8. #8
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    27,032
    Blog Entries
    1
    Hey Varsuuk

    The extension itself is meaningless. I have no need for anything that this extension does - it was purely an exercise in adding something to the char sheet and then making it interact with the database.
    I agree that the data manipulation could only be described as clumsy. The challenge to storing the original values and going back to them is what happens if I cycle thru to another title during another session then that data wont be saved.
    If I save the old values to the DB then what happens if I have a legitimate increase/decrease of an ability elsewhere for some other reason?
    Anyway - my coding is not one to mimic! The tutorial was purely meant to show how to locate what you want to edit, how to setup your environment and how to use Debug/Console to assist you in getting things to work.
    Im quietly confident that you will all produce much better extensions than this one

  9. #9
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,101
    Sorry, thought was part of some larger extension and was hoping to give ideas cos I’m soooo in karmic debt

  10. #10
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,101
    In days since FGCon I have probably saved over an hour from these shortcuts. I reload and select character, varsuuk etc at least 20+ times an hour... probably low end estimate.

Page 1 of 2 12 Last

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
Cosmere RPG Beta Launch

Log in

Log in