.GNUstepDefaults
file is very fussy - get something wrong, or miss a semi-colon, and it will overwrite itself to the default.If you're tinkering with the
.GNUstepDefaults
file, always make a back-up first - and take care!Correct!
Moderators: winston, another_commander
.GNUstepDefaults
file is very fussy - get something wrong, or miss a semi-colon, and it will overwrite itself to the default..GNUstepDefaults
file, always make a back-up first - and take care!Correct!
If Oolite is that picky I am already busted. My .GNUstepDefaults file has XML syntax, so I cannot take your example as verbatim.Nite Owl wrote: ↑Sun Jun 20, 2021 12:58 pmBe sure that your entry in .GNUstepDefaults looks exactly like the following and it should work.
The entry should be near the bottom of the file grouped with several other settings.Code: Select all
"always-flush-cache" = yes;
Now this sounds strange. Who is supposed to write the file?
I think I am stuck. Regardless whether I try to create a URL object, some XMLHttpRequest object or just call the global method fetch, I get ReferenceErrors in the logfile:hiran wrote: ↑Sat Jun 19, 2021 6:54 amActually I was playing around with that one. A 'Hello world' message to the logfile was successful, a 'HTTP GET' request so far not.
But let's assume the EcmaScript Engine is not limited and thus can run networking code, and one day I have the data transfer running.
Code: Select all
JavaScript exception (AllTogether 0.2): ReferenceError: fetch is not defined
I’m not sure if the entire JavaScript model has been set up in the scripting model available in Oolite. I’ll have to have a look through the source code to confirm though.
This is a real showstopper. So I'd be very happy if you could check that out for me.
How would you implement the frequent updates? Is that left to the second OXP (which does not resolve the problem at all), or the user to fire off the expansion manager? Cholmondeley is one among probably many users who does not want to be forced into updates...thecoredump wrote: ↑Tue Jun 22, 2021 11:40 amThat's why I thought more about a 2 oxps plugin :
- the first on containing only the "galaxy update", a config file describing events
- and the second, requiring the first, containing the scripts to giving life to those events
And then the player only have to frequently update the first OXP.
But it needs some sort of "Game Master" to update the first OXP.
Correct - a lot of what people think of as the Javascript "standard library" is more of a consequence of the most common interpreter being a web browser which has its own set of additional standards. fetch() etc doesn't exist in Node.js either - there, you use the http class to make connections. Network support was never implemented in Oolite, and neither was any of the XML/HTML parsing stuff for much the same reason.
Just to say, this sort of thing it not my cup of tea, but since you are trying to do something different, I'd like to support... so if you ever do get it off the ground I will want to participate and give it a try.
That is sad but I understand at the time of integrating the JavaScript engine noone thought of my use case.cim wrote: ↑Wed Jun 23, 2021 7:13 amCorrect - a lot of what people think of as the Javascript "standard library" is more of a consequence of the most common interpreter being a web browser which has its own set of additional standards. fetch() etc doesn't exist in Node.js either - there, you use the http class to make connections. Network support was never implemented in Oolite, and neither was any of the XML/HTML parsing stuff for much the same reason.
Hmmm. That is a completely different approach. More stuff to implement - but in the end a lot more powerful.cim wrote: ↑Wed Jun 23, 2021 7:13 amWhat you would need to do - and it would only work in a debug build, but that's not a massive drawback in practice - is:
1) The debug console connects to Oolite over a loopback TCP connection. It can run JS commands to both read and write data.
2) From Oolite's point of view, there's nothing special about the debug console - any application could implement that protocol.
3) So you'd write a separate app (in whatever language you liked) which connected to Oolite on one side using the debug protocol, and the server on the other with whatever protocol you wanted, and relayed information between the two.
Jupp, that is something that could work.another_commander wrote: ↑Wed Jun 23, 2021 7:38 amIf you are going to go the way of writing your own app for communication with Oolite, then understanding the console protocol will probably be helpful. Here is some related information: http://wiki.alioth.net/index.php/Oolite ... P_protocol
Thank you for the thumbs up. I will definitely need help with this.Cholmondely wrote: ↑Wed Jun 23, 2021 9:00 amJust to say, this sort of thing it not my cup of tea, but since you are trying to do something different, I'd like to support... so if you ever do get it off the ground I will want to participate and give it a try.
I was able to install a simple TCP server that would log everything to stdout. Oolite debug version connected and the output looked somewhat usable.hiran wrote: ↑Wed Jun 23, 2021 6:32 pmHmmm. That is a completely different approach. More stuff to implement - but in the end a lot more powerful.cim wrote: ↑Wed Jun 23, 2021 7:13 amWhat you would need to do - and it would only work in a debug build, but that's not a massive drawback in practice - is:
1) The debug console connects to Oolite over a loopback TCP connection. It can run JS commands to both read and write data.
2) From Oolite's point of view, there's nothing special about the debug console - any application could implement that protocol.
3) So you'd write a separate app (in whatever language you liked) which connected to Oolite on one side using the debug protocol, and the server on the other with whatever protocol you wanted, and relayed information between the two.
I even suspect this interface could help in Dual monitors / fullscreen mode
if the 'debug console' just opened another window to display HUD information.
Seems like I am getting somewhere. Although I have never seen the debug console in action (but studied a bit of it's source) now I have something thatcim wrote: ↑Wed Jun 23, 2021 7:13 amWhat you would need to do - and it would only work in a debug build, but that's not a massive drawback in practice - is:
1) The debug console connects to Oolite over a loopback TCP connection. It can run JS commands to both read and write data.
2) From Oolite's point of view, there's nothing special about the debug console - any application could implement that protocol.
3) So you'd write a separate app (in whatever language you liked) which connected to Oolite on one side using the debug protocol, and the server on the other with whatever protocol you wanted, and relayed information between the two.
I was able to read and modify the ship's cargo as well as the player's credit balance.