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!