Random jumps
-
In response to a PM, here’s my solution for random jump destinations (see RandomJumps.cpp for usage). The new file DATA\UNIVERSE\RandomJumps.ini contains the jump objects, along with their desired exit points. Currently all exits have equal probability, so if you want some chosen more frequently than others, just duplicate them. I also don’t think it’s entirely stable, but don’t know why, so be aware the client may crash (the server seems fine).
(There’s also a minor update to the packet dumper, since I added the system to FLPACKET_SERVER_SYSTEM_SWITCH_OUT, so the client sees the same system as the server.)
One example I just thought of:
[RandomJump] object = Li01_to_Li04 ; New York to Texas Jump Gate goto = Li04, Li04_to_Li01 ; normal destination goto = Li04, Li04_to_Li01 ; 2/3 the time goto = Li04, Li04_to_Li01_hole ; jump hole intercepts 1/3 the time
-
Bahaha… and i’ll tell u again my Wolfie friend “have at it”
Nice to know this is a possibility, Thanks AdoXa
-
this may be standing very close to this “random jumps” thingy, so i’ll ask.
could you try making jumps from any point in space to a point in another system by player command?this is a long-standing problem for some fl developers, you know :]
and i think there’s no need for something like fully finished plug-in, working prototype is quite enough. -
some time ago on windows live (if i’m right) i saw a modified flhook that could do this. it was used at that time on the BSG-Galactica.com server. either it is deleted now or i’m mistaking with the place i saw the download at… maybe m0tah knows more.
-
J.R. wrote:
Sorry for my noobish question, but…
Do I have to delete the original "goto = " Entry of the objekt in the System INI-File to make RandomJumps work ?Yes you need! The first jump after server restart is always one that is written there. Without that I ended up in no-ending jump sequence.
After first, other jumps r read from second .ini file (still testing do they go rndm even me doubt adoxa can make mistakes).
[EDIT]Yes you need!
Sorry 4 my mistake - I meant: Yes you need that line there!
-
@OutCast: Console does it for single player.
@J.R.: No, you don’t. You do have to add them to the new file, though.
@sumanuti: I was testing with a single destination, thus overriding the original goto. Just tested again - redirect Li01_to_Li02 to Li03, Li03_to_Li01 to Li02. Start the server, New York to California takes me to Colorado. Restart the server, Colorado to New York takes me to California.
-
I also tested this with a jumphole that had no destination, it worked perfectly.
In other words you can create a jumphole and give it no goto entry in any .ini file, and make another jumphole go to it with randomjumps.ini without issues.
Also, what happened to my “No, you don’t” answer to J.R?
-
adoxa wrote:
@J.R.: No, you don’t. You do have to add them to the new file, though.
Thanks for the reply adoxa.
Tested your great work and found it working very well… although I realise
that the first jump after server restart is always to its
original destination… maybe a random issue but a bit strange to me.
Anyways… I have to say a BIG THX to ADOXA. He is simply doing miracles !!! -
My case still acts like I posted before:
XX01.ini
[Object] nickname = XX01_to_RNDM_hole ids_name = 524826 pos = -12900, 0, 60900 rotate = 0, -45, 0 Archetype = jumphole_light msg_id_prefix = gcs_refer_system_XX01 ids_info = 60212 jump_effect = jump_effect_hole visit = 128 ;goto = XX01, XX01_to_RNDM_hole, gate_tunnel_bretonia
RandomJumps.ini
[RandomJump] object = XX01_to_RNDM_hole ; XX System Random Jumphole goto = XX01, XX01_to_RNDM_hole ; XX System back goto = Li02, Li02_to_Li01 ; California goto = Li03, Li03_to_Li01 ; Colorado goto = Li04, Li04_to_Li01 ; Texas
In custom system Random JH that ends up where it says.
1. case: As shown last line in XX01.ini is commented and jumps stuck in sequence!
2. case: Un-commenting last line I got jump finished but as said in place where is written - than after it reads all from RandomJumps.ini where to finish it.Also I found that client side don’t need special .ini so changing that is cool without notice.
Even like this - its amazing future that was planed long time before without sticking bunch of JHs in close spot. -
BTW, would you prefer RandomJumps.ini or multiple goto lines in the [Object] itself?
AWESOME work Adoxa ! Thx.
I would prefer a “RandomJumps.ini”, cause it´s NOT required client side and easier to handle the few Random Jumps within a ini, instead of several goto lines on a Object.
cheers
CURSOR -
Excelent work adoxa. Thank you very much. mate !!!
This will be a “new” feature in my Mod since i allready got so called “Instable Wormholes” in it.
Those used to have a different destination to “jump to” than the origin where you came from when you “arrive” there.
The new version of your DLL does perfectly what i was trying to “simulate” in the past. Many many THX !!!