modifications to the game, displaying images on the screen via lua scripts

Post Reply
psilocibinum
Posts: 1
Joined: Thu Oct 10, 2024 5:48 pm

modifications to the game, displaying images on the screen via lua scripts

Post by psilocibinum »

Hello!

I just discovered this game. I played for a while and decided to make a simple modification that adds a plot - so that when you reach certain planets, comic inserts appear, and the goal changes to the next planet.

But I'm generally a beginner in programming, so I would like to know how I can display a window with a picture on the screen when starting the game in a spaceport, for example? Or when landing in a certain place, for example, at a certain station... Another question in general - what are the limitations of lua scripts, is it possible to add objects to planets with their help?
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: modifications to the game, displaying images on the screen via lua scripts

Post by impaktor »

what are the limitations of lua scripts, is it possible to add objects to planets with their help?
No. See https://codedoc.pioneerspacesim.net for methods currently supported.

Adding image is probably no very beginner friendly.
Adding or improving a mission module might be more viable.
Or use our custom system editor to make custom systems.
sturnclaw
Posts: 82
Joined: Tue Sep 18, 2018 12:20 am

Re: modifications to the game, displaying images on the screen via lua scripts

Post by sturnclaw »

Displaying an image on screen is technically feasible - see the PiImage helper in data/pigui/libs/image.lua. The hard part is "drawing the rest of the owl", integrating that capability into a mod which adds new UI to display the image in, listens to game events and triggers the correct images, displaying the goal to players so they know where to go, and generally hooking into the various functionality needed to make the "plot" work.

Feel free to take a crack at it, but it's a non-trivial amount of work and at this time we don't have any particular "quick start guides" for implementing something of this specific scope. If you're unfamiliar with programming in general in addition to the Pioneer Lua API, this is likely not an achievable task without spending a significant amount of time in self-directed learning.
Post Reply