Anonymous | Login | Signup for a new account | 2023-06-10 01:41 UTC | ![]() |
My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0004134 | Zandronum | [All Projects] Suggestion | public | 2023-05-04 21:18 | 2023-05-08 13:21 | ||||||||
Reporter | TDRR | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||||||
Status | needs review | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 3.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0004134: [Patch] Lump reading API for ACS | ||||||||||||
Description | This patch adds the following functions to allow lump reading in ACS: int LumpOpen(str filename[, int start]): Returns the index to a lump named like <filename>. By default, the last lump matching <filename> is returned, but when <start> is specified, it'll start searching from that lump instead, making loading lumps cumulatively possible (like SNDINFO and MAPINFO). Returns -1 on error. int LumpSize(int lump): Returns the filesize of the lump. int LumpReadChar/LumpReadShort(int lump, int pos[, bool unsigned]): Reads 8/16-bits from <lump>, at byte <pos> and returns the result. If <unsigned> (default false) is true, the value is read as-is (so generally an unsigned integer), otherwise the sign bit is moved to be where it should in a 32-bit value. int LumpReadInt(int lump, int pos): Same as above, but reads a 32-bit value instead. An unsigned 32-bit integer would be represented in the same way, so that parameter isn't needed. str LumpReadString(int lump, int pos): Reads a null-terminated string from <lump>, starting from <pos>. This is also fine for reading text files, as the function stops upon reaching EOF. This API can allow numerous previously impossible or practically unfeasible features to be implemented by modders. The most obvious use would be externalizing data that would have to be written into the ACS source normally, preventing fully clientside addons to mods. Sure, LANGUAGE technically allows for this, but making cumulative lumps is pretty much impossible or heavily restrictive, and they're clunky to write at best. Like LiteSpree announcer packs, which are limited to 10 announcers, and each must have an unique index if they're to be loaded simultaneously. Another potential feature is reading and using tags in MD3s. Allowing for full Quake 3 player models (with the torso and legs being separate and each having their own animations), for instance. Attaching interchangeable weapon models to their hands and such too. Theoretically even model collision would be possible, but obviously wouldn't work well for online play. I'd make use of this myself in a Gears of War inspired mod. In third person gameplay with long reload animations and a variety of actions the player can do, you probably wouldn't want constant interruptions to what the torso is doing because the lower half of the body has to change animations. Lumps like MAPINFO could be read to extract information about maps or game settings that aren't exposed to modders by default, for example working around the limited custom skill level support by reading the skill level settings and accounting for them. It would additionally make it possible to read map files and get all sorts of information about the map. Calculating the checksum of a map manually would be made trivial, a feature that would by itself allow patching maps with new things and colored lighting. It would also make getting a map's vertices, lines, sectors, textures used and more possible. A couple personal use cases for me would be the TDBots, as I could easily plot nodes at the center of each subsector for a good set of path nodes made with zero modder or user intervention. And also patching maps with new Playstation Doom-ish lighting. | ||||||||||||
Attached Files | ![]() | ||||||||||||
![]() |
||||||
|
![]() |
|
TDRR (reporter) 2023-05-04 21:23 |
This would make 0004084 obsolete since the checksum generation can be implemented mod-side instead. |
Only registered users can voice their support. Click here to register, or here to log in. | |
Supporters: | Trillster |
Opponents: | No one explicitly opposes this issue yet. |
![]() |
|||
Date Modified | Username | Field | Change |
2023-05-04 21:18 | TDRR | New Issue | |
2023-05-04 21:18 | TDRR | File Added: lumpread.patch | |
2023-05-04 21:23 | TDRR | Note Added: 0022841 | |
2023-05-04 23:39 | Kaminsky | Relationship added | related to 0004084 |
2023-05-08 13:21 | DrinkyBird | Status | new => needs review |
Copyright © 2000 - 2023 MantisBT Team |