The online racing simulator
Searching in All forums
(363 results)
T3charmy
S3 licensed
Quote from T3charmy :Also in other news... after going through my flash drive and finding multiple PRISM backups... I'm happy to say I found the new website that I made for PRISM a while back!

although I'm gonna redo it yet again cause it was terrible...

Also I've pushed an update to fix undefined index on Take Over(TOC). I will create an updated Zip here shortly.
T3charmy
S3 licensed
Also in other news... after going through my flash drive and finding multiple PRISM backups... I'm happy to say I found the new website that I made for PRISM a while back!
T3charmy
S3 licensed
Quote from Dygear :Before Scawen finishes up the E patch levels, does anyone want any changes to the InSim interface?

Being able to change the client's PName would be nice.

Quote from DarkKostas :Agree. Unless it only gives you the ability to add a "prefix" like a tag. But that will keep your original name.

What i'd like to see is a


struct IS_STC { //SeTCoordinates
byte Type; // Value TBA
byte Size; // 20
byte SubT; //
byte PLID; // PlayerID

int X; // X map (65536 = 1 metre)
int Y; // Y map (65536 = 1 metre)
int Z; // Z alt (65536 = 1 metre) word Heading; // direction of forward axis : 0 = world y direction, 32768 =
bool ResetCar; // Reset car. 1 = Fix it, 0 = Keep it same as it was.
}


I'd like to see both of these... another thing I thought about was more buttons(and more button features)[including ability to use images]
T3charmy
S3 licensed
Quote from Dygear :You sir are awesome

What ever you say.

Quote from Dygear :Thanks for merging them into my master branch as well!

Merged it after testing it on my server for a bit since I knew it was stable already. Timers seem to be working as normal.
T3charmy
S3 licensed
Changes have been merged to repo. ZIP is ready for download: https://www.lfsforum.net/showt ... php?p=1843407#post1843407
Last edited by T3charmy, .
T3charmy
S3 licensed
Sure thing I'll fix that after work!
T3charmy
S3 licensed
LFS Strobe is done using simulated key presses. but it also takes in to consideration when you go to type(at least the versions I used).
T3charmy
S3 licensed
Quote from Dygear :Take out everything you don't want and make a plugin for LFSLapper / PRISM, etc..

PRISM would probably be a better bet as LFSLapper hasn't been updated in a long time(that I know of), and is lacking the new packets, and depending on what the user would like to achieve it may not be very much help over what he has now...
T3charmy
S3 licensed
Quote from Dygear :I perfer to do 0.4.5.1 and then 0.4.5.2 as apposed to 0.4.5a, 0.4.5b. PRISM follows PHP's number scheme and the version number should be able to be parsed by version_compare.

I had a feeling you'd say that, I've never seen PRISM get patched like this so.. improvised. Figured you'd say something one way or another. I shall fix that.

Also. I never knew of that PHP function.... Learn something new everyday. :P
Last edited by T3charmy, .
T3charmy
S3 licensed
I thought I might post how the new features can be used.

I have coded my own button manager(not included in this release that brings in a missing features from buttons as seen in LFSLapper), That is, alternating text. It also has the ability to have preset configs(ini files) that are loaded and placed on screen. Anyways... to the point!

This Timer is made when the user connects(NCN)

<?php 
        $this
->createNamedTimer("Cruise_ButtonHandle_{$UName}"'DoButtonHandle'0.50Timer::REPEAT, array($UName));
?>

Then on Disconnect(CNL)

<?php 
        $this
->removeTimer("Cruise_ButtonHandle_{$UName}");
?>

Of course timers still work the same as they did in 0.4.4

<?php 
        $this
->createTimer('RandMTCAll'600Timer::REPEAT);
?>

Now, the use PLC is a lot easier with the variables being defined:

<?php 
            $this
->Packets['PLC'] = new IS_PLC;
            
$this->Packets['PLC']->UCID($UCID)->Cars(0);
            foreach(
$this->Stats[$this->PrName]['Cars'] as $Car => $Value){
                if(
$Value){
                    
$this->Packets['PLC']->Cars += constant("PLC_$Car");
                }
            }
            
$this->Packets['PLC']->Send($HostID);
?>

in this example(from my cruise plugin :schwitz, on user connect a new PLC packet is created with no cars, then a foreach is ran against the array of Cars to see if the user owns that car, if the user does, it adds the cars PLC value to the packet, once it's ran through all 20 cars, it will send the PLC packet.

When a user buys a car , this is ran

<?php 
        
if($this->UCID != null){
            
$this->Packets['PLC']->Cars += constant("PLC_$Car");
            
$this->Packets['PLC']->Send();
        }
?>

(because I use this function to refund cars, it needs to check if the UCID is not null[cause that's the UCID I use for offline refunds]), anyways, assuming the user is online, it calls their stored PLC packet from my system, and adds the car's PLC value.

To sell a car, same thing:

<?php 
        
if($this->UCID != null && $Profile == $this->PrName){
            
$this->Packets['PLC']->Cars -= constant("PLC_$Car");
            
$this->Packets['PLC']->Send();
            if(
$this->CurrCar == $Car){
                
IS_MST()->Msg("/spec {$this->UName}")->Send();
            }
        }
?>

call the stored packet once again, and subtract the car's PLC value to get rid of the car(and then spectate them if that is the car they are currently driving)
Last edited by T3charmy, .
PHPInSimMod - PRISM 0.4.5 Discussion
T3charmy
S3 licensed
You can download PHPInSimMod - PRISM 0.4.5 from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.4.5
  • Version changed to 0.4.5
  • Added ability to create timers with names so that they can later be removed
  • Defined PLC car values Ex: PLC_UF1
  • Fix packet issue introduced in PHP 5.5
  • Fixed Pit Work Flags
  • Added a shell script to make it easier to run PRISM on linux
  • Code clean up(proper use of tabs and { })
PHPInSimMod (PRISM) 0.4.5.1
  • Fixes Undefined variable: cmdString. prism_plugins.php:213(,219, 231 and ,243)
PHPInSimMod (PRISM) 0.4.5.2
  • Fixes error from indirect modification of overloaded property... prism_plugins.php:258
PHPInSimMod (PRISM) 0.4.5.3
  • Fixes Double State information bug
  • Fixes a goof in Timers
PHPInSimMod (PRISM) 0.4.5.4
  • Includes missing [PLC] declared values that were to be in 0.4.5
Last edited by T3charmy, .
PHPInSimMod (PRISM) 0.4.5
T3charmy
S3 licensed
PHPInSimMod (PRISM) 0.4.5
  • Version changed to 0.4.5
  • Added ability to create timers with names so that they can later be removed
  • Defined PLC car values Ex: PLC_UF1
  • Fix packet issue introduced in PHP 5.5
  • Fixed Pit Work Flags
  • Added a shell script to make it easier to run PRISM on linux
  • Code clean up(proper use of tabs and { })
PHPInSimMod (PRISM) 0.4.5.1
  • Fixes Undefined variable: cmdString. prism_plugins.php:213(,219, 231 and ,243)
PHPInSimMod (PRISM) 0.4.5.2
  • Fixes error from indirect modification of overloaded property... prism_plugins.php:258
PHPInSimMod (PRISM) 0.4.5.3
  • Fixes Double State information bug
  • Fixes a goof in Timers
PHPInSimMod (PRISM) 0.4.5.4
  • Includes missing [PLC] declared values that were to be in 0.4.5
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Ok, once I get the pull request I should be ready to test it. In the next 24 hours right?

Alright, I submitted the pull request for the new feature, Seems to be working great on my server.
T3charmy
S3 licensed
Quote from Dygear :I'm going to give it 24 hours, then T3, if you'd like can you please setup for a PRISM 0.4.5 release. There are a number of enhancements that should be released to everyone.

Alright, I'm working on one more feature to push up from my personal codebase without breaking existing functionality of it. Almost done, just doing code cleanup, then will push to my server to do testing, then to my repo for a pull request.
T3charmy
S3 licensed
Quote from Dygear :Quick notice for everyone. There is an change in PHP 5.5 that breaks some string parsing in the packets module. It's an interesting "gotcha" that you should all be aware of. I noticed this problem in the LVS plugin when parsing the AXI packets the LName was filled with white space at the end. For now you'll want to trim() any string you get from the PRISM packet system until a core patch is applied.

Quote from T3charmy :Hmm, I noticed that not to long ago, was causing weird issues for me in my server that I hadn't ran in months, I ended up just doing:


<?php 
    
public function unpack($rawPacket)
    {
        foreach (
unpack($this::UNPACK$rawPacket) as $property => $value)
        {
            
$this->$property trim($value);
        }

        return 
$this;
    }
?>

and everything is working fine now... Granted, not sure if that causes issues elsewhere.

changed the code a little, and added a trim to all unpack functions(didn't realize there was more then one at first). Submited a pull request. Wanted to get some people to test this before it was merged.
T3charmy
S3 licensed
I also saw FPS improvements in E13 ...

in 0.6E I get around 170-190FPS, in 0.6E13 I am getting about 230-250FPS.

Gonna get my wheel set up, and try my Oculus Rift again, haven't tried it in a long time....
T3charmy
S3 licensed
Quote from geekas :Is this a PRISM bug?

I believe it should be

<?php 
    
public function onTakeOver(IS_TOC $TOC)
    {
?>

try that, if that doesn't fix it, let me know and I will look further into the issue.
T3charmy
S3 licensed
Tired of the arguing, question was answered(user needs to install PHP).

Closing thread.
T3charmy
S3 licensed
Quote from Dygear :Quick notice for everyone. There is an change in PHP 5.5 that breaks some string parsing in the packets module. It's an interesting "gotcha" that you should all be aware of. I noticed this problem in the LVS plugin when parsing the AXI packets the LName was filled with white space at the end. For now you'll want to trim() any string you get from the PRISM packet system until a core patch is applied.

Hmm, I noticed that not to long ago, was causing weird issues for me in my server that I hadn't ran in months, I ended up just doing:


<?php 
    
public function unpack($rawPacket)
    {
        foreach (
unpack($this::UNPACK$rawPacket) as $property => $value)
        {
            
$this->$property trim($value);
        }

        return 
$this;
    }
?>

and everything is working fine now... Granted, not sure if that causes issues elsewhere.
T3charmy
S3 licensed
Quote from just2fast :Yeah, at first I have to point out again, that racing in VR is wonderful

Yes it is, I'm gonna set up my wheel, and play with that later tonight with the OR. That should be intresting. I also got lent a Razer Hydra by a friend of mine, though not much use for that in LFS...
T3charmy
S3 licensed
Quote from Scawen :T3charmy, I hope that the next version will help a lot with that because the text and interface screens will be bigger and fixed in space in front of you, so you can look around them, while they seem to sit in front of you attached to your car.

Awesome, That's exactly how it is in minecraft, it's attached to a certain distance in front of the physical in-game character, So looking forward to that.
T3charmy
S3 licensed
Somewhat unrelated. I've been playing with the Oculus Rift today, and my only complaints so far, is the fact that chat is super hard to read(due to the pixelation), and the GUI's that are right on the edges are hard to see(Though, I'm not sure what exactly you can do about that).

Though once the Consumer version of the OR comes out, I imagine the text being hard to read will go (mostly?) away.

Edit: I kinda like the way GUIs are in Minecraft with the Oculus Rift, where the GUI is stationary, but you're still able to look around the area(and the GUI). I think if that was a option/setting for LFS, that would be very nice.
Last edited by T3charmy, .
T3charmy
S3 licensed
Been helping with clean up and such my self... Some pics...

Washington – 135 homes require MAJOR repairs, 491 total loss
Sunnyland(Part of Washington, but they put it seperate for some reason) – 15 homes require MAJOR repairs, 4 total loss

http://www.youtube.com/watch?v=-HktAsroAq8
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from cargame.nl :No that code he posted earlier is correct. It looks good and I tested it and it also works like it should.

@TRUCKER LTU; you probably changed something without telling what you changed to us

I knew it was correct, but I figured worst case scenario, that should fix it... I think... I've coded my own Button Manager, so I'm not 100% sure on how the buttons work in the built in PRISM button manager...
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from TRUCKER LTU :Thank you, now it is working
But not all functions
When I create button, and click on that button, I get an error:
Any ideas?

From what I can tell, everything looks right, hmm maybe try doing


<?php 
$btn_close
->registerOnClick($this'click', array()); 
?>

and see if that helps, if not reply, and I'll look further into it..(you shouldn't need the empty array, but that may be a temp fix.)
FGED GREDG RDFGDR GSFDG