[Web] SMTools

    Joined
    Jun 29, 2013
    Messages
    144
    Reaction score
    64
    • Modder
    • Legacy Citizen 4
    • Purchased!
    Hi everyone,

    A new topic for new scripts, since Wednesday I've worked on new PHP classes for your starmade project. The first one is SMUtils, this class let you read and write in all your server configuration files (server.cfg, server-message.txt, admin.txt, ...).
    The second class is SMLogin, it's a basic login for starmade registery OAuth 2 API.
    I've merged this project with SMDecoder, that's mean [File decoder] - SMDecoder php/node.js topic will be closed and all news will come here.
    This time i've also added a exemple.php to show you how to use some functions and i've documented each functions on each files (comment before function)


    Download:
    Version: 0.1-rev00006
    SM-Version: dev build 0.19+

    • *.cat
    • *.ent
    • *.fac
    • *.smbph
    • *.smbpl
    • *.smbpm -- actually broken
    • *.smd2
    • *.smd3
    • *.sment
    • *.smskin

    • admin.txt
    • blacklist.txt
    • protected.txt
    • server.cfg
    • server-message.txt
    • version.txt
    • whitlist.txt

    0.1-rev00006:
    - Update exemple.php for better reading of user data
    - Update *.smbph format to starmade v0.199
    - Update *.smbpm format to starmade v0.199 (work for many bp but not fully finished)
    - Decoding of serial data for entity
    - Add comments with bin, hex and char version for TAGs
    - Add special case for meta file in TAG_STR_SHORT
    - Remove unused variables
    - Fix hex encoding in std.php
    - Fix potential error in setStream function in std.php

    0.1:
    - Move SMDecoder to SMTools
    - Documentation of public functions
    - First commit of SMUtils.php
    - First commit of SMEncode.php
    - Added exemple.php to explaine how to use thoses classes

    • Add support for GameConfig.xml
    • Add formaters for SMDecoder
    • fix SMDecoder for meta.smbpm
    • Work SMLogin functions
    • Start SMEncoder project

    edit: to use SMLogin you'll need to set client_id, client_secret and redirectUri in SMTools.php at line 505
     
    Last edited:
    Joined
    Jun 29, 2013
    Messages
    144
    Reaction score
    64
    • Modder
    • Legacy Citizen 4
    • Purchased!
    Change-log v 0.1-rev00006:
    • Update exemple.php for better reading of user data
    • Update *.smbph format to starmade v0.199
    • Update *.smbpm format to starmade v0.199 (work for many bp but not fully finished)
    • Decoding of serial data for entity
    • Add comments with bin, hex and char version for TAGs
    • Add special case for meta file in TAG_STR_SHORT
    • Remove unused variables
    • Fix hex encoding in std.php
    • Fix potential error in setStream function in std.php
     
    • Like
    Reactions: JimmyJamba