The online racing simulator
Searching in All forums
(983 results)
PHPInSimMod - PRISM 0.3.6 Discussion
Dygear
S3 licensed
You can download PHPInSimMod - PRISM 0.3.6 from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.3.6
  • Changed flag ADMIN_LEVEL_O to ADMIN_OBJECT to as to be used with the AutoX related admin commands.
  • Updated welcome plugin now works correctly.
  • Fixed bug when issuing a command as the host.
  • Added isFemale, isAI & isRemote functions to IS_NPL packet.
  • Made some changes to the pth parser for use in a future version.
  • Added the following new packets from LFS version 0.6A1
    • IS_OBH reports information about any object hit.
    • IS_HLV reports incidents that would violate HLVC.
    • IS_PLC sets allowed cars for individual players.
    • IS_AXM to add / remove / clear autocross objects.
    • IS_ACR to report (attempted) admin commands.
Dygear
S3 licensed
PHPInSimMod (PRISM) 0.3.6
  • Changed flag ADMIN_LEVEL_O to ADMIN_OBJECT to as to be used with the AutoX related admin commands.
  • Updated welcome plugin now works correctly.
  • Fixed bug when issuing a command as the host.
  • Added isFemale, isAI & isRemote functions to IS_NPL packet.
  • Made some changes to the pth parser for use in a future version.
  • Added the following new packets from LFS version 0.6A1
    • IS_OBH reports information about any object hit.
    • IS_HLV reports incidents that would violate HLVC.
    • IS_PLC sets allowed cars for individual players.
    • IS_AXM to add / remove / clear autocross objects.
    • IS_ACR to report (attempted) admin commands.
Dygear
S3 licensed
PRISM did not have this problem, I don't think anyway, but then the packet handling code was made by Victor.
Dygear
S3 licensed
Quote from T3charmy :Oops? hmm, will test out the update... if i find any bugs, will let you know!

Yeah, I was in the middle of updating that, because I relized that not everyone was going to go from Z28 to A1, so strictly speaking that's not always going to be true. Thus I retracted that statement. Although I did provide my hosts.ini file as an example for the lost souls.

Just fixed a crash on when a IS_OBH packet is sent. You can see that fix here.

Ok, all packets now work on the receiving side. I just have to make some code for sending IS_AXM packets and I'll release 0.3.6!
Dygear
S3 licensed
You can get a LFS 0.6A1 InSim Version 5 compatible patch for PRISM here. Actually, even 0.3.5 should still work with the current patch, due to how PRISM handles packets. But, anyway, this version includes the new packets in the 0.6A1 patch for LFS. There is only one thing that I've not worked on that I must, and that's sending IS_AXM packets to InSim from PRISM.

Please do test, and you can all expect the next official patch pretty soon after this if no one finds major bugs. Any issues please report them here or in PRISM's Issue Tracker. Thank you all for using PRISM, and I hope to continue this development pace over the coming weeks.

One last quick note, in order to get all of the new fetures from the new InSim packets you must change the flags in your hosts.ini file.

My hosts.ini file looks like this for my local server.
; InSim Connection Hosts (automatically genereated)
; File location: ./PHPInSimMod/configs/hosts.ini

[localhost]
ip = "127.0.0.1"
port = 29999
flags = 2024
prefix = "!"
password = "password"
pps = 5

;[intranet]
;ip = "192.168.0.245"
;port = 29999
;prefix = "!"
;password = "password"
;pps = 5

So, to get the best out of PRISM all of these should be active (in bold).
define('ISF_RES_0', 1); // bit 0 : spare
define('ISF_RES_1', 2); // bit 1 : spare
define('ISF_LOCAL', 4); // bit 2 : guest or single player
[b]define('ISF_MSO_COLS', 8); // bit 3 : keep colours in MSO text[/b]
define('ISF_NLP', 16); // bit 4 : receive NLP packets
[b]define('ISF_MCI', 32); // bit 5 : receive MCI packets[/b]
[b]define('ISF_CON', 64); // bit 6 : receive CON packets[/b]
[b]define('ISF_OBH', 128); // bit 7 : receive OBH packets[/b]
[b]define('ISF_HLV', 256); // bit 8 : receive HLV packets[/b]
[b]define('ISF_AXM_LOAD', 512); // bit 9 : receive AXM when loading a layout[/b]
[b]define('ISF_AXM_EDIT', 1024); // bit 10 : receive AXM when changing objects[/b]

Last edited by Dygear, .
Dygear
S3 licensed
Fifth line reads
// InSim for Live for Speed : 0.5Z

should be
// InSim for Live for Speed : 0.6A(1)

.

Sixteenth line reads
// INSIM VERSION NUMBER (updated for version 0.5Z30)

should that not be
// INSIM VERSION NUMBER (updated for version 0.6A1)

also?

Thank you very much for the IS_ACR packet. That's a great help!
Dygear
S3 licensed
Quote from T3charmy :Yay <3

It should take a few hours, but yeah, 0.3.5 will be 0.3.6 with the new packets, and some updated plugins.
Dygear
S3 licensed
After dinner I'll be updating PRISM to include the new packets in 0.6A1.
Dygear
S3 licensed
Quote from misiek08 :So $this->btn[$btnid]->ClickID shows CID?

$this->btn[$btnid]->ClickID gets ClickID, whereas $this->btn[$btnid]->ClickID(1) set's the ClickID to 1.
Dygear
S3 licensed
I think that if it's good enough for Eric, then it's good enough for us. Just look at the tracks he has made with it!
Dygear
S3 licensed
That's a good question, as it should not really be possible to incercept messages in this way. Unless I've missed something within the InSim.h file ... What your saying is something I would like to see also, the power to handle messages from a client to sanitize them would provide a great level of power to any InSim application.
Dygear
S3 licensed
Quote from misiek08 :Propably we have to query LFSW on every joining user.

Only on new users. This bit of information should really be cached for S2 users, until S3 comes out. But then on each connection for someone with a Demo or S1 license. (I wonder what the break down is of Demo vs S1 vs S2 licenses is.)
Dygear
S3 licensed
Quote from misiek08 :@Dygear - one thing I have said it's propably done (moving objects). Allowing cars modifications will be only 1 topic from devs. Track editor? Maybe 2-3 months of work for Scawen, he's good programmer.

He already has a track editor.
Dygear
S3 licensed
Quote from samjh :Alonso at McLaren received the same treatment as Webber in Red Bull against Vettel: technical equality, emotional partiality. Hamilton was in a team that pretty much groomed him for many many years, and was British to boot. Alonso was neither of those.

I agree with this. Hamilton is one of their favorite sons.
Dygear
S3 licensed
If only, if only.
Dygear
S3 licensed
Stop spamming the forum.
Dygear
S3 licensed
Quote from morpha :Can't think of a fool-proof way either, but I'd imagine this stuff produces fairly consistent laptimes and it won't send chat messages, which is a start.

So do I, and I'm not very talkative when I'm in game (Via text chat, as I use Vent or TeamSpeak).
Dygear
S3 licensed
Mousers everywhere thank you!
Dygear
S3 licensed
Bug?: In mouse clip mode (Ctrl + C), I can still move my mouse to the outside edge of the window. While using a mouse to steer (and using the left click button to accelerate) this can cause the undesired operation of stretching / reducing the window size.

Can you please make it so that the mouse is clipped to the render width and height so that it may not adjust the size of the window while in Mouse Clip Mode.
Dygear
S3 licensed
Quote from GeForz :I've updated the layout object to include the "unified" indexes for z35.

Yeah, I really can't wait for Z35. It should make an interesting release, for LFS, for PRISM, for the world.
Dygear
S3 licensed
Quote from GeForz :Okay you are right!

I tried to put something together but the button concepts are killing me.
Stuff like adding a button for all connections and removing it for a single one... Oo

https://github.com/GeForz/PRIS ... gins/ButtonController.php
https://github.com/GeForz/PRIS ... rrent/plugins/welcome.php

Cool idea for the registerOnClick function. If you're willing to work on this, I'm willing to merge it into the main branch. Although you might want to have a look at my current as it has some updated values for the Powered By Button.

https://github.com/Dygear/PRIS ... rrent/plugins/welcome.php


<?php 
    
public function onClientConnect(IS_NCN $NCN)
    {
        
$BTN = new IS_BTN;
        
$BTN->ClickID(100)->UCID($NCN->UCID)->T(IS_Y_MAX IS_Y_MIN)->L(IS_X_MIN)->W(IS_X_MAX)->H(8);
        
$BTN->Text('Welcome to this ^3PRISM ^7Powered^8 Server.')->Send();
        
$BTN->ClickID(101)->T($BTN->$BTN->H);
        
$BTN->Text('PRISM Version ^7'.PHPInSimMod::VERSION.'^8.')->Send();
        
$this->createTimer('tmrClearWelcomeButtons'15Timer::CLOSE, array($NCN->UCID));
    }
?>

Just a couple of things, move ButtonController into the modules directory, as it's meant to be used by, many, many plugins. From there, I'll add the interface into the Plugins class (Much like timer is given some forwards within the Plugins class.) Great job!

There has also been some huge changes to the gapmon plugin, so I'm sure that misiek08 will want to take a look at that. Just keep in mind, it's not even close to being done yet.

https://github.com/Dygear/PRIS ... urrent/plugins/gapmon.php
Last edited by Dygear, .
Dygear
S3 licensed
Quote from Scawen :The approximate altitude has always been called Zchar, so I never forget that it has a different accuracy level compared with X and Y.

Quote from Scawen :You have missed the meaning of Index though. It is not an identifier of an individual object. It is one of the AXO_X numbers from the end of the LYT.txt file. Objects are not identified by a unique id or an index in a list (which could keep changing).

Thank you for clearing both items up for me.

Quote from GeForz :Maybe there is need for an "send objects"-tiny-request i.e. when the insim tool connects to a already running server?

Agreed, an ISP_TINY packet for this is an important step.
Dygear
S3 licensed
You could do the command `autox build garage` and it will wait for you to place an object. After you do place an AutoX object, InSim sends the IS_AXM with the details of the 1 object that was placed by you, the InSim application then goes on to use the AutoX object you just placed as the Geomertic center and adds the other AutoX objects around it, finally removing the object you placed at the end. I can see this working quite well, except for one thing.

struct ObjectInfo // Info about a single object - explained in the layout file format
{
short X;
short Y;
[b] char Zchar;[/b]
byte Flags;
[b] byte Index;[/b]
byte Heading;
};

First is, why is Z called Zchar? Was that an error? Should it not just be Z.
Second is how did you manage to Index 800 objects with a value of 0 - 255?

Sorry to be pedantic but could you make the Index the structs first value, as it's the most significant bit of data we will have.

struct ObjectInfo // Info about a single object - explained in the layout file format
{
[b] byte Id;[/b]
[b] byte Flags;[/b]
short X;
short Y;
[b] char Z;[/b]
byte Heading;
};

Last edited by Dygear, .
Dygear
S3 licensed
Cad != usd
Dygear
S3 licensed
Quote from cargame.nl :I want to be able to check if a racer is on the track or not. Continuously

Ok, I'll see if I can't cook some pesudo code up for you, or a PRISM plugin that will do this.

Quote from cargame.nl :(fyi, PRISM is running now 24/7 on our main server )

Sweet! Noticed your running 0.3.3 still. But very cool.
FGED GREDG RDFGDR GSFDG