The following warnings occurred: | |||||||||||||||
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.24 (Linux)
|
Patching extra functionality into <gamemd.exe> - Printable Version +- Renegade Projects Network Forums (https://forums.renegadeprojects.com) +-- Forum: Inject the Battlefield (https://forums.renegadeprojects.com/forumdisplay.php?fid=60) +--- Forum: Ares General Discussion (https://forums.renegadeprojects.com/forumdisplay.php?fid=19) +--- Thread: Patching extra functionality into <gamemd.exe> (/showthread.php?tid=16) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
- Marshall - 16.04.2005 Actually, 'divide by zero' is nonsensical. Just as inifinity isn't a number. zero/zero is also nonsensical. But this is getting off topic. Guest had a good idea, however if that were the case it would surely cause a problem on any OS. - pd - 17.04.2005 Guest's idea is wrong. The game gets the CellSpread value, e.g. 6. So it loads the 6th entry out of the valuetable by multiplying the value 6 with 4 (each value is a dword = 4 bytes) and adding the base address of the table. So 0 wouldn't cause any problems. What's funny is, that CellSpread is a float value. I dunno what happens if CellSpread=2.5 or 0.5. - CannisRabidus - 18.04.2005 Cellspread is used like that throughout the game. It certainly does work to define radius as you would expect. This is needed for infantry in particular, because infantry is never in the middle of a cell like a voxel is. - Bobingabout - 19.04.2005 in engineering, we assume devide by zero is infinity, because the smaller the number you devide by, the bigger your answer is. we use mathamatical "tricks" using infinity and zero to cancel parts of fomulas out to make the reverse process easier, and in some cases just possible. now here is a strange 1, anything devided by zero is infinity, but whats something over infinity? lets assume zero, so whats infinity devided by infinity? assuming both infinity is equal to infinity, then the answer is 1, but how can you be sure both infinitys are of equal size? that is 1 mathamatical jam we try not to get ourselves into... what was we talking about again? oh yes, cellspread is kinda strange, cellspread=0.1 works, but, as PD pointed out, its a table, so does it mean that the cellspread covers the entirety of that 1 tile? range seems to work fine though, although hight issues screw with it sometimes. - Marshall - 19.04.2005 I really don't want to get off-topic here, but: [@=infinity] X=1/Y As Y tends towards infinity, X tends toward zero. As Y tends towards zero, X tends toward infinity. 0/0 and @/@ are nonsensical. @ isn't a number, but logically: 1/1 = 1 X/X = 1 @/@ = 1 0/1 = 0 0/X = 0 0/0 = 0 Anyway, regarding cellspread, obviously there must be other code that uses the values in the cellspread table. - pd - 19.04.2005 I'm back at work, and created a small list of everything that uses the CellSpread-valuetable: Quote:Usage of the "CellSpread Table": Part #5 is weird, it's where the error occurs. I'll do a deep check now. - Marshall - 19.04.2005 I know that the Sight= of a building detremines how much shroud is revealed when the building also has RevealToAll=yes. - Bobingabout - 19.04.2005 hmmm... can someone send me a working version without sight and cellspread? - pd - 19.04.2005 Okay then, say "welcome back" to the limit of 11. I made up 4 test versions which Fenring tested (he had the same problem Marshall had). The only working version was the one with none of my new limited stuff at all. Not even CellSpread alone works, so I gotta remove it as well. - CannisRabidus - 19.04.2005 Here's a goofy idea. Feel free to ignore. UseQuadSpread=X When used as a [*Type] property, it modifies Sight= origin Default = 0, means don't use it. Values >0 means create an array of 4 origins, offset from the 'natural' origin by the number of cells specified by X. So if a unit has UseQuadSpread=3 and Sight=10, create an array of 4 sight origins offset from the natural origin by 2 cells in all 4 directions. This unit will be like having 4 units all unshrouding at the same time, and its effective Sight= would be 16. This really wouldn't work for Warhead CellSpread= since the overlapping spreads wouldn't seem circular without a much larger array. - jonwil - 20.04.2005 I was playing YR with the latest (1.04b) patch installed and got the attached except.txt crash early in the loading of the Massivesoft mission. In addition to your patch, I also have the latest version of the Terrain Expansion addon installed. No other mods or patches are installed as far as I know. BTW, great patch (I found out about it because I saw the Terrain Expansion news on planetcnc and installed RA2 and YR again to play with it. Then I saw about the game expansion packs because I was reading the Terrain Expansion and DeeZire message boards which lead me here). And I know all about except.txt files (they are great debugging tools , I deal with them all the time for another westwood game, Command & Conquer Renegade (I am the primary coder of a similar project to yours that ads extra functionality and unlocks stuff that didnt work right in the renegade engine). In fact, it appears to be identical code between RA2 and Renegade for spitting out except.txt files Also, I was very active back in the day in the TS/RA2 modding sceneand was (and still am in fact) friends with Olaf Van Der Spek of XCC mixer and Matze of FinalAlert. In fact, it was me that did a large part of work to figure out the TS/RA2 .SHP format way back when (and other stuff like the filenames of files in the various mix files) I do things differently to you though, what happens is that I load an extra dll into the renegade memory space which then patches the dezired offsets. This lets me work in a mixture of inline assembler and C (and the odd bit of machine code here and there where I need to write actual machine instructions directly to renegade memory space) Hopefully you can tell me if this crash is caused by your patch or something else. - pd - 20.04.2005 @Cannis: Right, would be a workaround for Sight only which isn't that elegant to be honest... @jonwil: DLL's a nice idea. When I began this project, I've been a complete beginner in EXE editing and machine code, even in ASM. People advised me to make the game use a dll rather than expanding the exe, but I wouldn't have known how to do that. Well, I gained a lot of knowledge working on this. The only knowledge that's missing now is how to declare API functions in ASM... the input tables don't tell me much :huh: Hm, but the possibility to code in C wouldn't help me much actually. Maybe it will though, when I do larger stuff... Anyway, you're IP points to B9800C... if any value begins with B9 or BA, it's very likely to be caused by my patch Hm... what's actually wrong - the address returned by YAPAXI (not a Yuri unit but a memory allocating function). I THINK (not know) the problem that I didn't leave the first 4 bytes of my data stock. The first 4 are mostly used for initialisation crap like data length etc. So maybe I should avoid writing to them. The question's that left is why does it occur in THAT mission... I should try that out myself. BTW, 1.04c should be released in a few minutes - Renegade - 20.04.2005 Building up on Cannis' idea...can't you perhaps just work around the bug by adding a multiplier? Like, Sight=10, SightMultiplier=1.5 or something? As in, perhaps you can cheat the game by technically leaving the Sight alone, but making the unit have more sight anyway. Just pondering... - jonwil - 20.04.2005 I wonder if there is anything I can do to help with this project... I do have skills in assembler myself and (depending on free time) might be able to throw some of those skills towards helping make RA2 a better game... Perhaps I can bring a different perspective and skillset towards this work... EDIT: I did a look at the YR exe file and I can see a few things already that are of note. Firstly YR uses Runtime-Type-Information which basicly means that essentially we have the complete class hierarchy (i.e. the name of the class plus which classes it is derived from/which classes derive from it) Secondly, YR has that ra2.tlb file. Looking at it with an OLE object viewer reveals that a bunch of the game classes appear to be (or have associated with them in any case) COM interfaces. This makes figuring out stuff about those classes a little bit easier (especially if combined with the Runtime Type Information from before) And thirdly, YR seems to use a number of "basic" classes (specifically VectorClass and DynamicVectorClass) that are also found in Renegade. In fact, I have lots of knowledge about these classes. - pd - 20.04.2005 :o :o :o That means those strings like ".?AVPlayerProfile@@" actually are useful? Yes you are... I always ignored them because I thought they're overlefts by anything, researches I've done about them didn't bring any results... But you're right... before each of those "class names", there are offsets, pointers to the classes... Damnit, you're God! EDIT: Ech, those pointers all point to the same offset. Anyway, we need to talk a little about that stuff in MSN |