...to access live data of a running universe? (e.g. available items in a store I'm currently in)
I'm thinking of enhancing my on-board computer(s) with some external add-ons.
Regards
Geri
Is there an API...
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Is there an API...
There is one, but it's only invokable by base and mission scripts. It's the savegame API, everything is stored in various ways inside the savegame.
You may want to check dynamic_universe.py and trading.py
You may want to check dynamic_universe.py and trading.py
-
- Star Pilot
- Posts: 4
- Joined: Fri Jan 18, 2013 4:17 pm
Re: Is there an API...
Thanks for the info. Does that mean every time I enter a store getImports() in trading.py (or rather trading.pyc) is executed and if I...
- create my_trading.py
- insert code to write prodlist to a file (or wherever) there
- compile my_trading.py to trading.pyc, thus replacing the original
...I can achieve what I want to?
PS: Unfortunately, despite of knowing almost a dozen of programming languages, I'm not skilled in Python at all. But, it's just another language, after all. Maybe it's the right time starting to deal with it...
- create my_trading.py
- insert code to write prodlist to a file (or wherever) there
- compile my_trading.py to trading.pyc, thus replacing the original
...I can achieve what I want to?
PS: Unfortunately, despite of knowing almost a dozen of programming languages, I'm not skilled in Python at all. But, it's just another language, after all. Maybe it's the right time starting to deal with it...
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Is there an API...
No, it's more like a background-running script that updates the economic status of the universe while you play. When ships are spawned, this computed inventory is loaded as cargo, which is what you can see on the trade interface when you dock.
-
- Star Pilot
- Posts: 4
- Joined: Fri Jan 18, 2013 4:17 pm
Re: Is there an API...
You mean trading.py is for the ships' cargo and not for the store items? What is trading.py then good for what I would like to do?
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Is there an API...
Ship's cargo = store items
-
- Star Pilot
- Posts: 4
- Joined: Fri Jan 18, 2013 4:17 pm
Re: Is there an API...
I see. Just a definition/communication problem.
With "ships' cargo" I meant the goods I'm carrying around with my ships.
With "store items" I meant the goods available in a base's store (a.k.a. Cargobay)
Thx
With "ships' cargo" I meant the goods I'm carrying around with my ships.
With "store items" I meant the goods available in a base's store (a.k.a. Cargobay)
Thx