Anybody left with POG scripting knowledge?

Home Forums Mods and POG Scripting Anybody left with POG scripting knowledge?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18884
    piratha
    Participant

    I want to create a simple list of text items to display in the GUI with a checkbox on the side and then pass this value to a function, that’s all.

    I’m somewhat put off from the almost zero usefull examples that come with the POG scripting reference, and the scarce quantity of source file around.

    I already compiled my first ever .pkg and bound the activation to a key and it works! (including some output strings on the console).

    I’m not that happy to run my code by launching the game, testing, closing, recompile, repackage and.. that would take forever! Does anybody have some code snippets to share? 😉

    #18888
    IronDuke
    Participant

    *raises hand*

    Although my knowledge is primarily centered around coding activity/gameplay. 😛 I did try to do some UI coding once, but it wasn’t easy. I feel you with the tiny amount of examples provided in the SDK, but you’re in luck: there are already several mods that add additional UI and buttons to the game, and you can base your code off of them.
    UniGUI is one of the best, considering that the others which I shall name all use it as a framework from which to branch out.
    Future Trader may well be the single biggest; it adds full buying and selling of every commodity in the game when docked at random stations, although the specific stock available depends on the station, progress through the game, and friendliness to the station’s faction. Lots of UI here!
    Station Save is simple: it adds an option to UniGUI to let you save your game whenever docked to a station. It’s a bit kludgy and bugs out easily, so I never used it much even though it’s installed. Still, it’s handy for an example.
    There’s one more mod called Station Assault which, while not really adding any UI of its own, builds on Future Trader and UniGUI, though it doesn’t require either. It adds more gunstars to stations and lets you destroy said stations for cargo, then respawns them after a few hours. Hilarious fun! If you do install Future Trader, then you can buy gunstars for your own station, though they’re never really useful since your base is never really attacked per se.

    All the mods should come with full source. I just double-checked, and Future Trader does for sure. In fact, its entire source is in one file, which surprised me. 😛 Station Save is by GrandpaTrout, but the other three are all by Zazicle, so they play well together. Hopefully this all will be helpful. 🙂

    The only way to really test out code is to launch the game and do the thing that you coded. :/ Unfortunately, I never figured out a better way to do it. Every change will need a recompile, and then firing up the game again since it won’t register a change without a restart. I guess we’re lucky modern PCs can start the game so fast. This was my biggest gripe when trying to code things, and was the biggest time-sink.


    I-War 2 Discord: https://discord.gg/RWaabWB
    Very little about the game is not known to me. Any questions you got, throw them at me. 🙂

    #18891
    piratha
    Participant

    Uhm I see. I’ll try some, but after getting my script to work I lost the biggest part of the momentum – let’s see!

    #18909
    piratha
    Participant

    I think I got it! last weekend I reworked the “FutureTrader” adding some usefull features and tweaked others. I also put together a personal MODpack.

    I’m still thinkering around the economy system. I modified the interface a little bit:

    _ when you dock to a station you’ll see your faction factor: above 0.6 it’s a friendly station
    _ when you dock you can see the CHEP and the EXPENSIVE items offered by the station (easy to market)
    _ in the top left list of goods’ type will always be included the cheap and expensive item category; before it was not coded rendering free trading impossible
    _ tweaked prices, added a 30% discount when dealing with friendly stations (basically you can buy cheap there)
    _ added.. a get 10K Free CU button – finally an easy money cheat (!)

    I’m still polishing them, need to write some changelog and come out with a name and credits where due :side:

    #18913
    IronDuke
    Participant

    [quote=”piratha” post=20735]_ when you dock you can see the CHEP and the EXPENSIVE items offered by the station (easy to market)
    _ in the top left list of goods’ type will always be included the cheap and expensive item category; before it was not coded rendering free trading impossible[/quote]
    …hadn’t thought of that. :whistle:


    I-War 2 Discord: https://discord.gg/RWaabWB
    Very little about the game is not known to me. Any questions you got, throw them at me. 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.