Everything else which you can't find above
- road tourist
- Posts: 105
- Joined: 01 Apr 2009 17:43
- Owned TM-games: MP, TMU(F), TMS, TMO
- Manialink(s): usdmania
- Location: Czech republic » Jihomoravský kraj » Břeclav
Hi, I have a simple question.
Is any way of editing map file correctly? Outside TM...
Code: Select all
$gbx = file_get_contents($filename);
$gbx = str_ireplace(array('Sunrise','Day','Sunset','Night'), 'Night', $gbx);
This PHP edited a file, but TM didn't open edited file...
- Pit Crew
- Posts: 5685
- Joined: 19 Aug 2007 12:58
- Owned TM-games: TMN, TMU, TMF, TM²
No, because the string length value just before the string itself is no longer correct in 3 out of 4 cases, the changed length will break all offsets to other data in the file, and the replace may affect more places in the track file than just the header. And even if you somehow managed to correctly changed the mood in such a simplistic manner, there's no guarantee you'll actually see the effect in-game, because the game client may use a Mood value from the data section instead of the header.
- swift roadking
- Posts: 758
- Joined: 02 Feb 2011 15:03
- Owned TM-games: TMO,TMNF
- Location: Novi Sad, Serbia