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 Thu Mar 28, 2024 10:24 pm
All times are UTC + 0
Tool for Auto-List Weapons and Projectiles
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [19 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
deathreaperz
Commander


Joined: 20 May 2013
Location: Indonesia

PostPosted: Wed Nov 22, 2017 3:42 pm    Post subject:  Tool for Auto-List Weapons and Projectiles Reply with quote  Mark this post and the followings unread

Hello, guys.

I heard that there is a tool that can generate lists of WeaponTypes and Projectiles, also updating Warheads lists and others automatically. What tool is that and where I can find that?

PS: This thread might be in a wrong forum.

_________________
Quote:
Humans were born for two things: to pray and be productive.


Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Nov 22, 2017 11:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Shouldn't be hard to implement, but what's that for

_________________

Back to top
View user's profile Send private message Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu Nov 23, 2017 7:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Ya seems the only purpose of this would be to more efficiently reuse weapons rather than unique weapons for every unit...

Not very useful I'd think.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
deathreaperz
Commander


Joined: 20 May 2013
Location: Indonesia

PostPosted: Thu Nov 23, 2017 12:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's like they are generating something like this...

[WeaponTypes]
0=105mm

This will help modders to have a list of weapons.

_________________
Quote:
Humans were born for two things: to pray and be productive.


Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Nov 24, 2017 1:03 am    Post subject: Reply with quote  Mark this post and the followings unread

You don't really need a [WeaponTypes] section

_________________

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Fri Nov 24, 2017 5:37 am    Post subject: Reply with quote  Mark this post and the followings unread

He does if he plans on making Weapons with similar names, but still needs to know which ones are taken and which are free, but Ctrl+F the whole document is good enough too.

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Fri Nov 24, 2017 5:38 am    Post subject: Reply with quote  Mark this post and the followings unread

With Ares, use the "Dump Types" Keyboard Command from the Development group.

_________________

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


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Tue Dec 04, 2018 10:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Bump. I could really use a way to print out the Weapons list or at least know how the game forms it. Why? Well, there's a certain trigger action (#42) that fires a weapon into a waypoint. It takes two parameters, one is the index of the weapon and one is the waypoint.

I've tried to deduce the Weapons list by testing, using this trigger action, but it's not as simple as I thought. It seems to list weapons used by BuildingTypes first, but the order does not always follow the order of buildings.

Any help?

Oh and this is for Tiberian Sun, so Ares can't help.

_________________


Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Dec 04, 2018 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Crimsonum wrote:
I've tried to deduce the Weapons list by testing, using this trigger action, but it's not as simple as I thought. It seems to list weapons used by BuildingTypes first, but the order does not always follow the order of buildings.

Is it possible the appended list of weapons is in order of instantiation? That is if the code for the buildings is loaded out of order relative to the declaration list, thus picking up the weapons as enountered while parsing?

Should be fairly easy to test by organizing the building code so that the first 3 have custom weapons that would be obvious if triggered...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Thu Dec 06, 2018 2:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

With the help of Bittah Commander, Dkeeton/xme and Tomson, I was able to determine how the list is formed (to an extent), though an automated list would still be handy. After all the list changes if you modify the order of TechnoTypes or their weapons.

In TS, the game checks for weapons in this order:
Code:
DropPodWeapon
SuperWeaponType #0 > WeaponType
SuperWeaponType #5 > WeaponType
BuildingTypes
AircraftTypes
VehiclesTypes
InfantryTypes


Objects are scanned in the order they appear in the Building/Aircraft/Vehicle/InfantryTypes list. In case of objects with multiple weapons, the game checks and lists them in the following order: Primary, Secondary, Elite. As with all the other object lists, if a weapon has already been listed, any subsequent instances are ignored.

_________________


Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu Dec 06, 2018 11:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok so AICHECK-mod just needs the sections re-orderd that's good.
Crimsonum wrote:
In case of objects with multiple weapons, the game checks and lists them in the following order: Primary, Secondary, Elite. As with all the other object lists, if a weapon has already been listed, any subsequent instances are ignored.

How specific is this behaviour? The default unit code has the elite weapons listed later as written by WW, so if it parses the whole unit adding each in turn, you'd get the above described effect, even if it isn't explicitly so.

Like if you have ElitePrimary after Primary but before Secondary... would it still load after?

*EDIT* removed attachment, updated below

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Last edited by G-E on Fri Dec 07, 2018 8:15 pm; edited 1 time in total

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Dec 06, 2018 11:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
How specific is this behaviour? The default unit code has the elite weapons listed later as written by WW, so if it parses the whole unit adding each in turn, you'd get the above described effect, even if it isn't explicitly so.
Can be checked using Ares

_________________

Back to top
View user's profile Send private message Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Dec 07, 2018 2:00 am    Post subject: Reply with quote  Mark this post and the followings unread

I didn't make it to be endlessly useful, I did it because it was an easy addition, and RA2 and TS don't have such Ares help.

Though I would like to know what Ares says are the first weapons before the buildings are added...

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 28 May 2013

PostPosted: Fri Dec 07, 2018 8:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Weapon list looks complex with hardcodings. It would be better to get the list from the game.exe itself like what the Ares does.

Attaching the vanilla YR weapon list obtained from Ares Dump Types command.



YRVanillaWeaponList.rar
 Description:

Download
 Filename:  YRVanillaWeaponList.rar
 Filesize:  109.71 KB
 Downloaded:  14 Time(s)


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


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Fri Dec 07, 2018 1:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
How specific is this behaviour? The default unit code has the elite weapons listed later as written by WW, so if it parses the whole unit adding each in turn, you'd get the above described effect, even if it isn't explicitly so.

Like if you have ElitePrimary after Primary but before Secondary... would it still load after?


I should've specified this, but yes, the order in which the flags are read is the same no matter which flag is declared first in the object section. So Primary is read first, then Secondary, then Elite, if those two latter even exist.

_________________


Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Dec 07, 2018 4:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well that's interesting, I realized I didn't add the gattling handling code to builtings in AICHECK because of this experiment.

But I'm still getting wildly different results in terms of ordering.



compy.jpg
 Description:
 Filesize:  221.16 KB
 Viewed:  1114 Time(s)

compy.jpg



_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Fri Dec 07, 2018 4:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks like the logic follows closely to TS's. The first two are derived from DropPodWeapon and NukeSpecial, however the third one (NukePayload) is an exception. After these three it scans buildings in the order of the BuildingTypes list. Vulcan is from the Sentry Gun, the first building with a weapon. Next is RedEye2 from the Patriot launcher, CoilBolt and OPCoilBolt from the Tesla Coil, and so forth.

This actually explains why cluster weapons have to be assigned to dummy units, otherwise the weapons don't get listed, so the game cannot find them when expected, and it crashes.

Why didn't they just implement a [WeaponTypes] list in Rules(md).ini....

_________________


Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Dec 07, 2018 7:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

The game is full of awkwardness and inconsistency. There are so many better ways to do things but they just miss them.

_________________

Back to top
View user's profile Send private message Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Dec 07, 2018 8:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Updated it to use the list order instead of the code order...

What I didn't do is change the weapon slot orders within the object, it loads them all as it reads them, but looking through the list, I only see 3 spots where this rearranged anything, the IFV (CRNuke seems to change spots?), the GGI and INIT. The rest are a match.

Presumably this means it would be similarly very accurate for TS.

*EDIT* Ahh I understand, DeathWeapons come before turret/weapon changers...



aicheck-mod.rar
 Description:

Download
 Filename:  aicheck-mod.rar
 Filesize:  12.81 KB
 Downloaded:  9 Time(s)


_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [19 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.1708s ][ Queries: 14 (0.0141s) ][ Debug on ]