Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat Apr 20, 2024 12:56 am
All times are UTC + 0
Cleaning up the rulesmd.ini
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Symphonic
Tiberian Fiend


Joined: 06 Jan 2009

PostPosted: Tue Apr 13, 2010 5:57 am    Post subject:  Cleaning up the rulesmd.ini Reply with quote  Mark this post and the followings unread

So, the rulesmd.ini file is a pile of crap.

Here's my work so far on cleaning it up, making it look nicer, and adding further comments to help explain things.

Any suggestions for additions?



rulesmd.ini
 Description:

Download
 Filename:  rulesmd.ini
 Filesize:  721.62 KB
 Downloaded:  870 Time(s)


Last edited by Symphonic on Wed Apr 14, 2010 5:56 am; edited 2 times in total

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Apr 13, 2010 6:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Try to organize the comments so that as many of the semi-colons would be on the same column as possible. But remember to keep a reasonable space between the comment and the actual code. For example:

Code:

RefundPercent=50%       ; percent of original cost to refund when building/unit is sold
ReloadRate=.3           ; minutes to reload each ammo point for aircraft or helicopters
RepairPercent=15%       ; percent cost to fully repair as ratio of full cost
RepairRate=.016         ; minutes between applying repair step
RepairStep=8            ; hit points to heal per repair 'tick'
URepairRate=.016        ; [units only] minutes between applying repair step
IRepairRate=.001        ; [infantry only] minutes between applying repair step
IRepairStep=20             ; [infantry only] hit points to heal per repair 'tick' for infantry
TiberiumHeal=.010          ; minutes between applying Tiberium healing [for those units that heal in Tiberium]
SelfHealInfantryFrames=50   ; time in frames between infantry auto-heal
SelfHealInfantryAmount=20   ; amount of health restored at each interval ;hospital
SelfHealUnitFrames=75      ; time in frames between unit auto-heal
SelfHealUnitAmount=5       ; amount of health restored at each interval ;machineshop


I would change this to

Code:

RefundPercent=50%       ; percent of original cost to refund when building/unit is sold
ReloadRate=.3           ; minutes to reload each ammo point for aircraft or helicopters
RepairPercent=15%       ; percent cost to fully repair as ratio of full cost
RepairRate=.016         ; minutes between applying repair step
RepairStep=8            ; hit points to heal per repair 'tick'
URepairRate=.016        ; [units only] minutes between applying repair step
IRepairRate=.001        ; [infantry only] minutes between applying repair step
IRepairStep=20          ; [infantry only] hit points to heal per repair 'tick' for infantry
TiberiumHeal=.010          ; minutes between applying Tiberium healing [for those units that heal in Tiberium]
SelfHealInfantryFrames=50  ; time in frames between infantry auto-heal
SelfHealInfantryAmount=20  ; amount of health restored at each interval ;hospital
SelfHealUnitFrames=75      ; time in frames between unit auto-heal
SelfHealUnitAmount=5       ; amount of health restored at each interval ;machineshop 


Or even

Code:

RefundPercent=50%          ; percent of original cost to refund when building/unit is sold
ReloadRate=.3              ; minutes to reload each ammo point for aircraft or helicopters
RepairPercent=15%          ; percent cost to fully repair as ratio of full cost
RepairRate=.016            ; minutes between applying repair step
RepairStep=8               ; hit points to heal per repair 'tick'
URepairRate=.016           ; [units only] minutes between applying repair step
IRepairRate=.001           ; [infantry only] minutes between applying repair step
IRepairStep=20             ; [infantry only] hit points to heal per repair 'tick' for infantry
TiberiumHeal=.010          ; minutes between applying Tiberium healing [for those units that heal in Tiberium]
SelfHealInfantryFrames=50  ; time in frames between infantry auto-heal
SelfHealInfantryAmount=20  ; amount of health restored at each interval ;hospital
SelfHealUnitFrames=75      ; time in frames between unit auto-heal
SelfHealUnitAmount=5       ; amount of health restored at each interval ;machineshop


But try also to avoid big gaps between the comment and the code, the ones on my 2nd example are quite big already, so I'm unsure whether I'd use that or the 1st one.

I also had an index at the top part of my organized rules.ini, and although it may be redundant, you can quickly see all the sections that the rules.ini contains, and you don't have to memorize a section name when you can quickly look it up from the list. Note that I have changed the position of some sections in the rules.ini, simply so that they would fit better with the index. For example I put the "Misc." as the last subsection in [General], although originally it was somewhere in the middle.

Code:

; ¤¤¤¤¤ Index ¤¤¤¤¤
;
; Use the index number or the (sub)section name to find what you're looking for
;
; Sections:            Subsections:   
;
; 1.  General         1.1.  Veteran Factors
;                     1.2.  Repair & Refit
;                     1.3.  Income & Production
;                     1.4.  Computer & Movement Controls
;                     1.5.  Ion Storm Control
;                     1.6.  Droppod Flight Characteristics
;                     1.7.  Hover Vehicle Characteristics
;                     1.8.  Subterranean Vehicle Characteristics
;                     1.9.  Production & Power Effects
;                     1.10. Hack Section
;                     1.11. Brett Sperry Hack Section
;                     1.12. Firestorm Defense Controls
;                     1.13. Veinhole Monster Parameters
;                     1.14. AI Trigger Weighting Parameters
;                     1.15. Spotlight Controls
;                     1.16. Radar Even Controls
;                     1.17. Voxel Debris ID Holders
;                     1.18. Building Prerequisite Categories
;                     1.19. Hunter-Seeker Controls
;                     1.20. Threat Evaluation Controls
;                     1.21. Misc.
; 2.  Jumpjet Movement Controls
; 3.  Special Weapon Controls
; 4.  Audio/Visual Rules
; 5.  Crate Rules
; 6.  Combat & Damage Rules      6.1.  General Settings
;                                6.2.  Particle System Defaults
;
; Different objects in the game are listed in the following 15 categories:
;
; 7.  Houses List
; 8.  Sides List
; 9.  Infantry Types List
; 10. Building Types List
; 11. Aircraft Types List
; 12. Vehicle Types List
; 13. Terrain Types List
; 14. Smudge Types List
; 15. Overlay Types List
; 16. Animation Types List
; 17. Voxel Animations List
; 18. Particle Types List
; 19. Particle Systems List
; 20. Superweapon Types List
; 21. Warhead Types List
;
; 22. Multiplayer Settings
; 23. Object Heap Maximums
; 24. AI Skirmish Controls
; 25. AI Generals      ; Listed, but obsolete
; 26. Computer IQ Settings
; 27. Country Statistics
; 28. Color Values
; 29. Difficulty Settings
;
; 30. Unit & Building Statistics   30.1. Ground Vehicle Statistics
;                                  30.2. Infantry Statistics
;                                  30.3. Aircraft Statistics
;                                  30.4. Building Statistics
; 31. Weapon Statistics
; 32. Projectile Statistics
; 33. Particle System Statistics
; 34. Particle Statistics
; 35. Warhead Statistics
; 36. Terrain Characteristics
; 37. Overlay Objects
; 38. Smudge Objects
; 39. Land Characteristics
; 40. Random Crate Power-Ups
; 41. Tiberium Varieties
; 42. Object Mission Controls
; 43. Voxel Debris Types
; 44. Weapons of Mass Destruction
; 45. Global Variables
;
; END OF INDEX
;


EDIT: Oh damnit, I didn't notice the "Note: ...." in your post. Anyway, if the spacing needs no fixing the way I showed, then it's all good.

Oh, and the [code] does break the spacing. No idea why...

_________________


Back to top
View user's profile Send private message
AltomareXD
General


Joined: 22 May 2008

PostPosted: Tue Apr 13, 2010 9:51 am    Post subject: Reply with quote  Mark this post and the followings unread

I made this a long time ago. Basically an easy way to add units while avoiding the 100 units bug.

Code:
; ******* Vehicle Type List *******
; This lists all of the vehicles types in the game. Each vehicle
; type should have a matching section that specifies the data it
; requires.


[VehicleTypes]

;THIS LIST HAS BEEN RENUMBERED BASED ON MODENC'S 100 UNITS BUG LIST BY DCODER
;ALLIED UNITS GO HERE

1=AEGIS    ;AEGIS CRUISER
2=AMCV     ;ALLIED MCV
3=BFRT     ;BATTLE FORTRESS
4=CARRIER  ;AIRCRAFT CARRIER
5=CMIN     ;CHRONO MINER
6=DEST     ;DESTROYER
7=DLPH     ;ARMORED DOLPHIN
8=FV       ;INFANTRY FIGHTING VEHICLE
9=LCRF     ;AMPHIBIOUS TRANSPORT
10=MGTK    ;MIRAGE TANK
11=MTNK    ;GRIZZLY BATTLE TANK
12=ROBO    ;ROBOT TANK
13=SHAD    ;NIGHTHAWK TRANSPORT
14=SREF    ;PRISM TANK
15=TNKD    ;TANK DESTROYER


;SOVIET UNITS GO HERE

16=APOC    ;APOCALYPSE
17=DRED    ;DREADNOUGHT
18=DRON    ;TERROR DRONE
19=DTRUCK  ;DEMOLITION TRUCK
20=HARV    ;WAR MINER
21=HYD     ;SEA SCORPION
22=HTK     ;FLAK TRACK
23=HTNK    ;RHINO TANK
24=SAPC    ;AMPHIBIOUS TRANSPORT
25=SCHP    ;SIEGE CHOPPER
26=SMCV    ;SOVIET MCV
27=SQD     ;GIANT SQUID
28=SUB     ;TYPHOON ATTACK SUB
29=TTNK    ;TESLA TANK
30=V3      ;V3 ROCKET LAUNCHER
31=ZEP     ;KIROV AIRSHIP


;YURI'S UNITS GO HERE

32=BSUB   ;BOOMER SUBMARINE
33=CAOS   ;CHAOS DRONE
34=YHVR   ;HOVER TRANSPORT
35=YTNK   ;GATTLING TANK
36=LTNK   ;LASHER TANK
37=MIND   ;MASTERMIND
38=PCV    ;PSICORPS MCV
39=SMIN   ;SLAVE MINER
40=TELE   ;MAGNETRON
41=DISK   ;FLOATING DISK


;MOD UNITS SHOULD GO DOWN HERE ONWARDS UNTIL 100.
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=

;UNUSED UNITS ARE PLACED HERE
101=AMBU
102=BCAB
103=BUS
104=CAR
105=CBLC
106=CDEST
107=CIVP
108=CMON
109=CONA
110=COP
111=CRUISE
112=DDBX
113=DeathDummy
114=DOLY
115=EUROC
116=FTRK
117=HORV
118=HOWI
119=YCAB
120=YDUM
121=JEEP
122=LIMO
123=PICK
124=PROPA
125=PTRUCK
126=SCHD
127=STANG
128=SUVB
129=SUVW
130=TAXI
131=TRUCKA
132=TRUCKB
133=TUG
134=UTNK
135=VLAD
136=WINI
137=XCOMET

Last edited by AltomareXD on Tue Apr 13, 2010 10:09 am; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Apr 13, 2010 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

The 100 units bug has been fixed by RP, NP & Ares so not many ppl are worried about it any more.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Tue Apr 13, 2010 10:27 am    Post subject: Reply with quote  Mark this post and the followings unread

@Crimsonum: Does an index as you demonstrated add a noticeable amount of size to the file?

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Tue Apr 13, 2010 10:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Probably only something like 2KB #Tongue

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Apr 13, 2010 12:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
Probably only something like 2KB #Tongue


Something like that, yeah Laughing

@Altomare: I have to admit, I'm not fond of the "all in caps" text.

_________________


Back to top
View user's profile Send private message
Symphonic
Tiberian Fiend


Joined: 06 Jan 2009

PostPosted: Tue Apr 13, 2010 4:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you don't mind I think I'm going to steal that index, with some changes for mine. :p I was actually working on my own, but it wasn't formatted as nicely, and I ended up scrapping it because I wasn't happy with how it looked. Bahahaha.

And I'm going to organize the units a different way, but thankyou.

Also, does anyone know anymore unit conversions, like I added to the top? Like leptons, frames, etc?

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Apr 13, 2010 6:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Symphonic wrote:
If you don't mind I think I'm going to steal that index, with some changes for mine. :p I was actually working on my own, but it wasn't formatted as nicely, and I ended up scrapping it because I wasn't happy with how it looked. Bahahaha.


Yeah, feel free to use it. I guess it's free for use now that I copied it here.

Quote:
Also, does anyone know anymore unit conversions, like I added to the top? Like leptons, frames, etc?


"900 Frames per Minute, 15 FPS" This of course varies depending on the game speed setting Wink 15 frames = 1 second in middle speed setting (3).

In the game, a cell is also 23 pixels wide in N-S axis and 48 pixels wide in W-E axis. So a pixel is 1/1104th of a cell. Small, yeah. A lepton would be approx. the size of 4,3 pixels by this logic.

I can't come up with any other units used in the game(s) that would need converting.

_________________


Back to top
View user's profile Send private message
Symphonic
Tiberian Fiend


Joined: 06 Jan 2009

PostPosted: Tue Apr 13, 2010 6:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Crimsonum wrote:
Symphonic wrote:
If you don't mind I think I'm going to steal that index, with some changes for mine. :p I was actually working on my own, but it wasn't formatted as nicely, and I ended up scrapping it because I wasn't happy with how it looked. Bahahaha.


Yeah, feel free to use it. I guess it's free for use now that I copied it here.

Quote:
Also, does anyone know anymore unit conversions, like I added to the top? Like leptons, frames, etc?


"900 Frames per Minute, 15 FPS" This of course varies depending on the game speed setting Wink 15 frames = 1 second in middle speed setting (3).

In the game, a cell is also 23 pixels wide in N-S axis and 48 pixels wide in W-E axis. So a pixel is 1/1104th of a cell. Small, yeah. A lepton would be approx. the size of 4,3 pixels by this logic.

I can't come up with any other units used in the game(s) that would need converting.


900/15 is the standard frame rate. I think... 3 on the game speed setting?

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Apr 13, 2010 7:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes.

_________________


Back to top
View user's profile Send private message
Symphonic
Tiberian Fiend


Joined: 06 Jan 2009

PostPosted: Tue Apr 13, 2010 11:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

I updated the first post with a download link.

Please help me with this? Smile

Suggestions on what to add/fix/comment/remove would be greatly appreciated!

I already deleted the AI Generals section, is there anything else I can safely delete?

_________________
PreRA2 Dev Lead

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1940s ][ Queries: 13 (0.0099s) ][ Debug on ]