Since we're working on the controller, Would it be possible we could add something for the steering axis similar to what you can do with keyboard(steer rate/return rate) for those of us playing with handheld controllers such as PS4, Xbox controllers.
Edit: Xbox one controller doesn't get the Accel/Brake settings correctly. Mine are reporting as combined, and the default setting is separate. Changing to combined causes the correct axis to be selected, but invert is set to 1 by default, which as bobloblaw is the opposite of what you'd expect. All other settings seem reasonable
Also something that's slightly annoying, When running Win 10 technical preview, and they release a new update it seems to wipe out my license from LFS.
Edit 2: and if possible on top of the first point(which at that alone would be very much appreciated!), possibly add it to where we are able to adjust the multiplier/sensitivity for all axes not just the steering. kind of like how Mouse X and Mouse Y work where you're able to.
Another thing that could be useful would be to map the right joystick to being the look heading, but being able to set a limit for it, like all the way left is 90, all the way right is 90, and pressing the joystick down would be look behind
Yikes. It's yet another hell storm out there right now. Under a tornado warning. I'll let you guys know how things go.
Edit: Ended up going more North of me. Had some crazy winds, thunderstorms, and some hail. Tornados did touch down to my West but they were about an hour or so drive away. It was definitely scary I'll tell you that.
Reposting these notes that have been updated for new version of PRISM
Notes:
Due to some LFS limitations, if you want to actually send any translations on connect(or in my case I had an account class that was spawned on Client Connect)
on your __construct of your plugin do this
<?php $this->setTranslationSettings('plugin_name'); # if your default fallback language is English(en) $this->setTranslationSettings('plugin_name', LANG_FR); # if you'd rather specify a different fallback # Translations will fail if this isn't ran. ?>
Your fallback language is the language the translation engine will go to if the users language is missing.
Due to some limitations of implementation in LFS, if you want to use translations, you'll need to do stuff you would normally do in NCN, in an NCI packet.
<?php public function onClientConnect(IS_NCI $NCI) { $NCN = $this->getClientByUCID($NCI->UCID); #Continue on with rest of NCN packet the way you would in the IS_NCN packet ?>
Example usage(These can not be used in NCN or any packets before the NCI connection):
<?php public function onPlayerJoin(IS_NPL $NPL) { $client = $this->getClientByUCID($NPL->UCID); $this->translatePrivateMessage($NPL->UCID, 'User_Welcome', array($client->PName)); $this->translateGlobalMessage('Global_Message'); # You can also specify an argument array here aswell } ?>
File setup:
; PRISM/data/langs/plugin_name/LANG_EN.ini ; Might return this to the old file naming convention ; which was /PRISM/data/langs/plugin_name/en.ini Global_Message = "^7This is a global message!" User_Welcome = "^7Hello, %s^7!"
; PRISM/data/langs/plugin_name/LANG_FR.ini Global_Message = "^7Ce est un message global!" User_Welcome = "^7Bonjour, %s^7!"
And yet another minor update pushed that fixes getPlayerByUName not working as UName was not defined in Player Handler. As usual download can be found here: https://www.lfs.net/forum/post/1903571#post1903571
Question(Mainly for Scawen, but if anyone has any input please do tell!), is there anyway that we can have a user who is currently on track re-spawn with IS_JRR packet without having the packet cause an IS_CRS packet to be sent? Trying to add a !flip(Puts them back on their wheels without repairing the damage) command to my server, with the JRRAction JRR_RESET_NO_REPAIR (5), but this is causing my insim to do other things with the user as it also triggers a IS_CRS.
Just for giggles I tried doing a JRRAction of 6, and of course that doesn't even reset the car at all(not that I expected it to).
Yea, if you want it to be more smooth, you could increase the PPS in PRISM's host config. I believe 25PPS is the max. Also I probably broke it when I was last min rewriting it to clean it up, and get rid of useless code... Hm. I will have to look at PRISM's core. UName should be defined in Player Handler
Also Nice! I was gonna make it follow behind, but my math skills were a little rough, so I just threw it together this way. I think I would like following behind better honestly... but increasing PPS may cause the car to spawn inside you... not sure.
Edit: Fixed this(getPlayerbyUName) in 0.5.0.6 of PRISM which I will release later today.
Yep. that worked great. Sadly, what I was playing with can never be more than a proof of concept, but never the less, it's kinda cool I'm really glad to finally have this packet added ... and as much as other might not like to hear this. It really has great potential on cruise servers.
For anyone interested here is the PRISM plugin I ended up with:
256 may be precise enough. we will find out.I mean it's not a super big deal that they're EXACTLY the same, but roughly the same would be nice. I think I tried dividing by 182, but did not round it... so that may be why it didn't work. will try it when I get home.
Hmm, ok, when I get home I will look closer. it may be a matter of I'm rotating too much(May only need to use 90 instead of 180. don't know. will find out in about an hour
Right now I'm spawning a concrete slab below where I spawn them so that I am able to spawn them in the air(since ground checking is enforced), but I am currently trying to implement it so that a car can "hover" above another car(the slab is no big deal, as it prevents the car from falling on top of the other car which when that happens they intersect and go flying).
But my problem is. I can't seem to get the heading to match the heading of the car it's hovering above. Is there some weird math that is being done? from what LFS outputs with MCI, and what JRR takes in?
I tried the existing code we used in another PRISM plugin that takes the data and uses it to place a chalk arrow on the ground... and that still seems to be off...
here's the code from the plugin for layout objects, should the same code work? if so, something might be bugged either in PRISM's handling of the data or the way LFS handles it(or I'm misunderstanding how it should work).
$AXM = new IS_AXM(); $AXM->PMOAction(PMO_ADD_OBJECTS)->Info(array($obj))->send(); #JRR X,Y,Z code is slightly different($x & $y divided by 4096 instead of 65536) #I'd include it but it's on my other computer... #but no matter what I try for the heading, I can't get it to match up. ?>
0.5.0.4 is out now. Fixes some issues when PRISM is ran in single player.
Edit 2/17 @ 21:50 GMT: 0.5.0.5 is released, adding ability to colorize the terminal thanks to cargame.nl. as well as fix another issue with PHP 7 compatibility & a minor change to the translation engine(how it's handled when requested text is missing from the user's language).
Hmm, was testing PRISM, and was having issues when connecting to a local server over a TCP connection, but worked ok over UDP, what is everyone else using?
Edit: Fixed PHP 7 compatibility issues with command callbacks
Edit 2: Version 0.5.0.2 is now available for download.
Edit 3: I think I've narrowed the crashing with TCP problem to this function in prism_hosts.php
<?php public function read(&$peerInfo) { $this->lastReadTime = time(); return stream_socket_recvfrom($this->socket, STREAM_READ_BYTES, 0, $peerInfo); } ?>
Hate replying to old threads. but is there anyway to reduce sensitivity? Hate when the smallest movement of the joystick results in the wheel cranking to the either side. LFS detects my controller without any additional software, and if I recall inputmapper didn't help with the sensitivity last time I tried setting it up.