Hey all,
I'd like to get started on some modding - but I'm having trouble right out of the gate. I've got lua documentation, I've got the api documentation, and I've seen this page on the wiki: http://avorion.gamepedia.com/Modding and http://avorion.gamepedia.com/Entity_scripts
Is there a hello world tutorial out there somewhere?
I'm attempting to just get a simple chat message to pop up.
So far I have:
-- file scripts\entity\jaynic_test.lua
package.path = package.path .. ";/data/scripts/lib/?.lua"
require ("stringutility")
-- init function fired after all functions registered
function initialize()
displayChatMessage("This is a message", "SenderMonkey",3)
end
and I've added the script to be fired via the "defaultscripts.lua" in scripts\lib
-- file \scripts\lib\defaultscripts.lua
function AddDefaultShipScripts(ship)
ship:addScriptOnce("data/scripts/entity/startbuilding.lua")
ship:addScriptOnce("data/scripts/entity/entercraft.lua")
ship:addScriptOnce("data/scripts/entity/exitcraft.lua")
ship:addScriptOnce("data/scripts/entity/craftorders.lua")
ship:addScriptOnce("data/scripts/entity/transfercrewgoods.lua")
ship:addScriptOnce("data/scripts/entity/collaboration.lua")
ship:addScriptOnce("data/scripts/entity/jaynic_test.lua")
end
function AddDefaultStationScripts(station)
station:addScriptOnce("data/scripts/entity/startbuilding.lua")
station:addScriptOnce("data/scripts/entity/entercraft.lua")
station:addScriptOnce("data/scripts/entity/exitcraft.lua")
station:addScriptOnce("data/scripts/entity/crewboard.lua")
station:addScriptOnce("data/scripts/entity/backup.lua")
station:addScriptOnce("data/scripts/entity/bulletinboard.lua")
station:addScriptOnce("data/scripts/entity/story/bulletins.lua")
station:addScriptOnce("data/scripts/entity/craftorders.lua")
station:addScriptOnce("data/scripts/entity/transfercrewgoods.lua")
station:addScriptOnce("data/scripts/entity/collaboration.lua")
end
But no message is popping up. Any help would be great
On a related note: can I reccomend a sub forum for "modding help" - maybe even separate mod releases / requests? Just a thought