Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...
Iran

Unhardcoded internal (type) lists

Recommended Posts

I've added the option to add sound effects, warheads, weapons and projectiles to the game. At startup RULES.INI will be read and it checks for a bunch of lists. Only at startup.

 

You should add them to RULES.INI like this. Remember if you use the spawner system or CnCnet v5 SPAWN.XDP will be loaded instead of RULES.INI.

 

[soundEffects]

0=DERP

1=SHIT

..

 

[bulletTypes] (Projectiles)

0=LaserGuided2

1=Lobbed2

 

[Weapons]

0=TeslaZap4

1=dummy

2=TeslaZap2

3=TeslaZap3

 

[Warheads]

0=AP2

1=AP3

 

Warheads, projectiles (BulletTypes) and weapons work like in Arda. You need to define the actual types you list. For sound effects you just need to add a new sound effect name to [soundEffects] and the game will load them, if the file exists.

 

Adding extra sound effects hasn't been tested, so please do that for me.

 

You need this exe: https://dl.dropboxusercontent.com/u/21865790/ra95.exe

Share this post


Link to post
Share on other sites

So completely new weapons can be added rather than changing the current selection?

Share this post


Link to post
Share on other sites

So completely new weapons can be added rather than changing the current selection?

Yes

 

I added support for adding new UnitTypes (vehicles) to the game, they internally are setup like the Medium Tank but you can use RULES.INI keys to configure the newly added vehicle. I'll have to add more useful RULES.INI keys for vehicles in the future. Example of adding a new vehicle called 'DERP':

 

[unitTypes]

0=DERP

..

 

; 2TNK medium tank clone

[DERP]

Prerequisite=weap

Primary=90mm

Strength=400

Armor=heavy

TechLevel=6

Sight=5

Speed=8

Owner=allies

Image=2TNK ; use 2TNK.shp and 2TNKICON.shp instead of DERP.shp and DERPICON.shp

Cost=800

Points=40

ROT=5

Tracked=yes

Crewed=yes

 

new EXE: https://dl.dropboxusercontent.com/u/21865790/ra95.exe

 

Share this post


Link to post
Share on other sites

holy Jesus christ on a flying bicycle

Now I can add new units dilly dally :D

That's totally awesome

Share this post


Link to post
Share on other sites

This is some epic sheet. You are following the steps of Westwood when they made TibSun. Now if the other needed logic could be un-hardcoded. Like Turret = [yes/no] Crusher = [yes/no] (both from TS) IsAPC = [yes/no] (Maybe this could be done by editing of the Passengers =) and BuiltByAI= Unit is build by multiplayer/skimish mode AI [yes/no]

Share this post


Link to post
Share on other sites

Well holy shit, we now have the option to bundle a load of new units into the game and see what happens. This extended stuff you've done for RA recently is absolutely amazing.

Share this post


Link to post
Share on other sites

This is some epic sheet. You are following the steps of Westwood when they made TibSun. Now if the other needed logic could be un-hardcoded. Like Turret = [yes/no] Crusher = [yes/no] (both from TS) IsAPC = [yes/no] (Maybe this could be done by editing of the Passengers =) and BuiltByAI= Unit is build by multiplayer/skimish mode AI [yes/no]

Those are straightforward to add but it requires a lot of time, I first need to setup a system for every type to extend them and to clear the extended memory when loading savegames (with extra check for 3.03 savegames), clear memory when loading a scenario and I need to get a system working to extend TechnoTypeClass memory for every derived type.

 

Anyway, I've added support for adding new infantry (set up like E1 internally), buildings (set up like ATEK internally), aircrafts (set up like HELI internally) and vessels (set up like DD internally). Adding new vessels at the moment isn't practical as drawing the turrets on them is hard-coded based on their ID, e.g. it checks if the vessel has the ID for the Cruiser to draw the Cruiser turrets, etc.

 

[VesselTypes]

0=DD2

1=DD3

 

[AircraftTypes]

0=HII2

1=HII3

 

[buildingTypes]

0=HERP

1=DERP

 

[infantryTypes]

0=FLAM

1=OFFI

 

New EXE here: https://dl.dropboxusercontent.com/u/21865790/ra95.exe

Share this post


Link to post
Share on other sites

I added support for adding new animations to the game. I haven't tested adding a new one. If someone could give me a setup with a few added animations to the game I could start making animations configurable. Internally added animations are setup like FBALL1. I think there's the same refresh area or something like that and possibly the same sound attached to the animation.

 

[AnimTypes]

1=HUE

2=DEEE

...

 

New EXE: https://dl.dropboxusercontent.com/u/21865790/ra95.exe

Share this post


Link to post
Share on other sites

WARNING: Adding new stuff may seriously damage CnCNet5's accuracy with endgame results!

0pf1.png

 

What logic is that?

 

I think Jacko is referring to the various states of the SSML; loaded, half-loaded, empty.

Share this post


Link to post
Share on other sites

The 2 missile SSM from Tiberian Dawn, where it has 2 missiles loaded, then 1 and then none

Share this post


Link to post
Share on other sites

Yeah game stats are broken when you add new units, it writes past the memory allocated to keep unit stats so it also corrupts memory. But that should only happen when playing online or while if spawner is enabled, skirmish.

 

Oh, it will take a while before I'm able to add that kind of SSM logic.

Share this post


Link to post
Share on other sites

Ok

 

I think the SSM graphics are hidden in the RA MIX files attached to the old MRLS files for some reason.

Share this post


Link to post
Share on other sites

Is there a keyword for enabling units similar to the Phase Transport (APC w/turret)? Currently it just looks wrong due to the number of images in the SHP before the first turret frame (38, vs the standard 32 of regular turreted vehicles).

Share this post


Link to post
Share on other sites

If the SSM Launcher is called "MLRS.SHP" then it has 32 frames for the body and 96 frames for the turret. 32 frames for the empty, half-loaded and fully loaded state. When I find the code responsible for drawing the turret it shouldn't be hard to add logic for it, if the ammo count is 0, 1, 2 in the respective states.

 

I've added a new Crusher= flag for UnitTypes, see this topic:  http://cnc-comm.com/community/index.php?topic=2606.0

Share this post


Link to post
Share on other sites

Yeah game stats are broken when you add new units, it writes past the memory allocated to keep unit stats so it also corrupts memory.

 

Can also causes a crash at the end of a map for this reason. Probably the wrong place to ask but is there a way of disabling the stat tracking?

Share this post


Link to post
Share on other sites

Those are straightforward to add but it requires a lot of time, I first need to setup a system for every type to extend them and to clear the extended memory when loading savegames (with extra check for 3.03 savegames), clear memory when loading a scenario and I need to get a system working to extend TechnoTypeClass memory for every derived type.

 

Anyway, I've added support for adding new infantry (set up like E1 internally), buildings (set up like ATEK internally), aircrafts (set up like HELI internally) and vessels (set up like DD internally). Adding new vessels at the moment isn't practical as drawing the turrets on them is hard-coded based on their ID, e.g. it checks if the vessel has the ID for the Cruiser to draw the Cruiser turrets, etc.

 

Yes I know it will take time to get eveything done but they will be needed to make the full range of units. I think getting vehicles fully working would be the best as every one wants more tanks. :) Below is a wish list of keys by type and I know that it may never happen but I can dream right?

 

Aircraft: IsPlane= Is a fixed wing aircraft and need airstrip [yes/no] (If not listed on aircraft the game will assume the aircraft is a helicopter) Rotor= [yes/no] IsAPC= [yes/no] (Like transport helicopter) One key I would like for my own lols is a key like the Carryall= Tib Sun. Maybe this could be done by using the load and unload logic from the transport [LST] so vehicles could be loaded on to a helicopter.

 

Ships: Turret= [yes/no] (I'm fine with center mouted turret like the Destoyer has but away to turn the turret logic off so more subs could be made is needed), IsLST= Can this ship load and unload vehicle or infantry [yes/no] IsCarrier= Can this ship load and launch helicopter? (It would be really cool if comd be made into 2 keys. For the current Helicarrier logic and one for a new a carrier logic that uses fixed wing aircraft like the Yak and MiG.)

 

Buidlings: Foundation = the size of the building (This may need a Height= like Tib Sun so maybe Foundation= would use the name of stock building like POWR and your new buiding would use the Power Plant's foundation and height), Factory = type of object to build [infantryType, AircraftType, UnitType, BuildingType, VesselType] and IsGunTurret= [yes/no] (This would be the same as Turret= for unit and make the game use the 128 frame logic of the Gun Turret and AA Gun.)

 

Infantry: IsEngineer=, IsMedic, IsMechanic=, IsSpy= and IsThief=.

 

Is there a keyword for enabling units similar to the Phase Transport (APC w/turret)? Currently it just looks wrong due to the number of images in the SHP before the first turret frame (38, vs the standard 32 of regular turreted vehicles).

 

Give Passengers= to a unit that dosn't already have APC logic won't work as the game won't let you unload them. This is why a IsAPC= key is need so the game knows to unload them.

Share this post


Link to post
Share on other sites

After a bunch of nonsense (also known as 'dickheaded typing errors on my part') last night, I finally got a new animation to work. Is it limited to 'muzzle flash' type animations at the moment, or can animated projectiles (like the Flame Tower's fireball) be created?

 

Speaking of projectiles, any new projectile types I try adding won't show up no matter what I do. Chances are I'm missing something (again), but even something which refers to an original image ends up being invisible for whatever reason:

[FROG2]
Arm=10
Arcing=yes
High=yes
Shadow=no
Proximity=yes
Animates=yes
Ranged=yes
Inaccurate=yes
Image=V2
Rotates=yes

This won't appear ingame. At first I thought the 'arcing' flag might have been responsible, but then this projectile also refused to appear:

[DumbRocket]
Arm=2
High=yes
Shadow=no
Proximity=yes
Animates=yes
Ranged=yes
Inaccurate=yes
AA=no
Image=DRAGON
ROT=0
Rotates=yes
Translucent=yes

 

Both projectiles are copy/paste edits of existing projectiles, they're both listed in [bulletTypes], and as far as the attacks go it's pretty much the same deal; both listed in [Weapons], and all I've done is clone existing weapon definitions and tweak them accordingly.

 

(It's worth noting that despite this, they still actually exist in-game; they're fired, leave smoke trails and explode as expected, I just can't see them.)

Share this post


Link to post
Share on other sites

I fixed the invisible projectiles issue, thanks for reporting! (The graphics weren't being loaded)

 

New EXE: https://dl.dropboxusercontent.com/u/21865790/ra95.exe

 

The fireball effect works with this projectile:

 

; wizard's fireball

[Fireball]

Animates=yes

Image=FB1

Frames=8

 

Did you try something with that? I honestly have no idea about how it works. But it looks like you can crate animated projectiles like that.

Share this post


Link to post
Share on other sites

Not really a list, but another hardcoded feature is whatever classes the Medic/Mechanic as healing type units. While attempting to give similar 'weapons' to other units does result in negative damage on anything friendly, they never stop with their action; even once the target is fully healed/repaired, the unit will carry on trying to fix them (complete with sound).

 

(They'll also be able to target enemy units and heal those, which is never a good thing.)

Share this post


Link to post
Share on other sites

is it possible to patch/code new unit producers

(e.g. if I wanted to be able to build infantry with a tech centre instead of barracks, or to spam tanks out of the Ore Refinery)

Share this post


Link to post
Share on other sites

>is it possible to patch/code new unit producers

>(e.g. if I wanted to be able to build infantry with a tech centre instead of barracks, or to spam tanks out of the Ore Refinery)

 

Probably not, there's lots of hardcoded checks.

 

@Echo: Sounds possible but I don't know where this checks are, it's a good one for the todo list.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...