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 Jun 13, 2024 3:49 am
All times are UTC + 0
Using 0x0 structures and Ares UnitDelivery to create upgrades
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Sun Jul 09, 2023 1:39 am    Post subject:  Using 0x0 structures and Ares UnitDelivery to create upgrades Reply with quote  Mark this post and the followings unread

Recently, I had an idea to use the method described here for creating invisible, invincible, insignificant "research" structures and combine it with auto-firing Ares UnitDelivery superweapons to create a more accurate "research" effect. My testing so far has been pretty successful.

I actually have it set up where I have two dummy buildings and two superweapons. The first superweapon and building is just used to "perform" the research. There's an auto-granted superweapon with 1 charge that starts ready with the ready text changed to "Fund". This is set to not auto-fire but uses AI targeting so the player only needs to click the icon. My plan would be to give this superweapon a cost so this would be an initial upfront cost for the "research"

Firing would therefore spawn the first 0x0 node which is itself holds the second superweapon which is set to auto-fire and similarly delivers the real 0x0 "research" node with all the effects I actually want it to do.

My original plan was to use this system to replace the current country selection system which includes a unique unit but also veterancy and specific stat changes. If successful, it would mean being able to get more creative with how those things are selected and free up space on the country list in case I do something really dumb like try to create 32 different sides of one country each.

However, I've hit a bit of a wall. Granting unit prerequisites is trivial, as is veterancy thanks to the academies feature of Ares. That's when things start getting tricky as all I have to really work with in terms of stat changes is reducing cost using a FactoryPlant effect. I thought I remembered running by a feature of either Ares or Phobos that provided global stat change options but I fear I was mistaken.

I suspect this system is also a big jank for mutually exclusive research paths. I haven't tested it yet but it may be possible to trigger multiple superweapons together before a negative prerequisite can take effect.

I'm kind of just hoping someone here can help build on this so that maybe I can get it to do what I want it to do.

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sun Jul 09, 2023 4:02 am    Post subject: Reply with quote  Mark this post and the followings unread

You can give the dummy upgrade building an attach effect weapon that covers the whole map & only effects your units. You can then make stat changes to all units or specific ones.

You can use Prerequisite.Negative= &/or SW.NegBuildings= to disable different upgrade branches.

_________________



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
m7
Commander


Joined: 17 Apr 2009

PostPosted: Sun Jul 09, 2023 4:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Final War also has some 0x0 building tricks like this used, feel free to download the project and explore the code if you need more inspiration on what can be done.

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


Joined: 20 Jan 2008
Location: Texas

PostPosted: Sun Jul 09, 2023 10:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
You can give the dummy upgrade building an attach effect weapon that covers the whole map & only effects your units. You can then make stat changes to all units or specific ones.


I thought about that but I wasn't sure if it would cause a significant amount of lag or not. I guess it's worth testing at this point though, since I don't have any other leads.

Also @m7, thanks for info. I will definitely dig into the code at some point.

Back to top
View user's profile Send private message ModDB Profile ID
wardeathfun
Commander


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Mon Jul 10, 2023 6:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey there, I've been dicking with these type of buildings for a long time now. They do not cause a lot of lag until you start having them by the hundreds, then they start to be problematic for other reasons. For example, there are bugs I've experienced where they will cause you not to be able to click spots as normal even in spite them being fully invisible to the player. Other than that, they work great, and they will pretty much spawn wherever they want, and you can give them map wide effects with no real issue within reason (weapons might be laggy, but ares and phobos greatly optimizes performance too so I haven't had problems in a long time). With this said, Phobos also has a thing called Limbo Delivery (https://phobos.readthedocs.io/en/latest/New-or-Enhanced-Logics.html?highlight=off%20map#limbodelivery) which delivers basically a structure that fully functions as a prerequisite (as well some other features, not many), which you may consider to experiment with to fully optimize your game with.


On the topic of 32 sides for country thing, you can do a lot more with limbo prerequisites. You can, in theory, have infinite unique playable countries due to Ares' unique paradrop planes. When you list new countries in the country list past 31= (33rd+ country), you can still create a section for them the game honors and with Ares' [Country]?ParaDrop.Types= tag, you can have a special paradrop plane fly in the game that can serve as a designator with Ares' Designator tags to spawn a dummy structure or use Phobo's Limbo structure to permanently use as a prerequisite crutch. Basically, your 55th country has a [Country55] section with a [Country55]?ParaDrop.Types=CargoPlaneDummy55 which when on the field immediately triggers a superweapon that immediately spawns a structure that can be used as a prerequisite for tech exclusively for country 55. Normally, the only reason you cannot have more than 32 countries is because the country list loops and the only things that are honored were changing the name, veterancy, and miscellaneous country bonuses since early Rockpatch days, but ever since the [Country]?ParaDrop.Types= tag, infinite countries, mate!





As far as other upgrade options, I've exploited Attach Effect weapons. Basically an entire map, sometimes I do 500 cell size so my really large maps are entirely covered, but 255 cell size will work fine too. With this, you can adjust a lot https://ares-developers.github.io/Ares-docs/new/attacheffect.html?highlight=attacheffect and it doesn't lag at all. Another option is https://phobos.readthedocs.io/en/latest/New-or-Enhanced-Logics.html?highlight=detonate%20warhead#detonate-warhead-on-all-objects-on-map which I also use a lot because it allows me to upgrade units a bit flawlessly and also do more "unique" attach effects that requires a superweapon to fire constantly which doesn't seem to lag at all in my experience, meaning you can literally have your own custom weather storm upgrade on your weather tanks for example that spawn storm clouds, or the opposite, whatever.


With the detonate warhead superweapon, the 0x0 superweapon also is pretty snazzy allowing you to spawn a structure on top of units (or at least near them) when said warhead detonates https://phobos.readthedocs.io/en/latest/New-or-Enhanced-Logics.html?highlight=superweapon#launch-superweapons-on-impact , so you can have alot more unique upgrade options this way which, again, strange upgrade options while jank are not lag inducing and while sloppy in code seem natural to the player.



My responses may be slow but I'll respond if you have any questions eventually, so feel free to ask. Hope I helped spark some inspiration.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Mon Jul 10, 2023 8:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh wow, thank you so much for all the useful information! I'm glad my fears of lagginess don't seem to be much of an issue. That will certainly get me more involved in doing more creative things going forward.

I also am realizing that I have been kind of sleeping on Phobos. I remember browsing the docs when I was first looking into it and saw the LimboDelivery superweapon but I totally forgot about it when I was brainstorming this who system. That and the detonate warhead on all objects should be very helpful here. It gives me a lot to play around with.

wardeathfun wrote:

On the topic of 32 sides for country thing, you can do a lot more with limbo prerequisites. ... Normally, the only reason you cannot have more than 32 countries is because the country list loops and the only things that are honored were changing the name, veterancy, and miscellaneous country bonuses since early Rockpatch days, but ever since the [Country]?ParaDrop.Types= tag, infinite countries, mate!


Could you elaborate a bit more on this? Is it that the RequiresHouses tags don't work with countries past 31=? It sounds like the country section itself is properly parsed and implemented, so I am kind of curious to know what exactly breaks. It could change how I approach this in two ways:

1. I'm currently using the Client so any out-of-game user interface stuff is less of a concern for me. I would like to have unique loading screens if possible though.

2. Ares academies ironically don't update cameos to the alt version if they make units veteran. I kind of assumed they would when I first started this mess because it's an advertised fix for country veterancy bonuses, but unfortunately that doesn't seem to be the case. I assume this is because academies don't give a fixed 1 level of veterancy like spying and country initial veterancy do.

Back to top
View user's profile Send private message ModDB Profile ID
wardeathfun
Commander


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Mon Jul 10, 2023 11:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

The country list essentially loops with the RequiredHouses= tag. If I were to say RequiredHouses=Americans (country 0=Americans) then this would equal to country 32=COUNTRY33. This is also why if you were to make a tag say RequiredHouses=COUNTRY33, you will notice that when you play as Americans you will be able to build COUNTRY33 stuff. COUNTRY33 and Americans are essentially the same country to the game's RequiredHouses tag.The game loops every 32 countries, so while the RequiredHouses tag works, it just doesn't exclude properly from all countries but basically all countries not in that index of 32 countries.


With that said, the game absolutely honors everything under [COUNTRY33], which includes the paradrop plane that can fly, serve as a designator, and trigger a superweapon that instantly summon a dummy structure you use in prerequisites. This dummy structure, from now on, is your new requiredhouses as well your new SW.RequiredHouses. All you need to do is make a dummy paradrop weapon that paradrops nothing but instantly fires that invisible dummy paradrop plane that has a designator that immediately spawns the unique dummy limbo object. If you give ALL of your countries this unique superweapon, they will ALL be unique.


I for example have the following stuff:
Code:

[General]
PrerequisiteAmericansoneprAlternate=PDNINJAAmericans0
PrerequisiteAmericanstwoprAlternate=PDNINJAAmericans1

[GenericPrerequisites]
AMERICANSONEPR=BNINJASoulAmericans0
AMERICANSTWOPR=BNINJASoulAmericans1

[AircraftTypes]
WPCYEX0=PDNINJAAmericans0
WPCYEX1=PDNINJAAmericans1

[BuildingTypes]
WPCYEX0=BNINJASoulAmericans0
WPCYEX8=BNINJASoulAmericans1

[SuperWeaponTypes]
EXPERIMENTS3=ParaDropSpecialDum
WPCYEX0=SPAWNSWSoulAmericans0
WPCYEX16=SPAWNSWSoulAmericans1

[ParaDropSpecialDum];The sacred exploit!
UIName=Name:Para
Name=Paratrooper Drop
IsPowered=false
SW.AITargeting=Base;Self
RechargeVoice=
ChargingVoice=
ImpatientVoice=
SuspendVoice=
RechargeTime=0.1
;Message.Launch=NOSTR:ParadropSpecialDum exploit launched
SW.Shots=1
Type=ParaDrop
Action=ParaDrop
SidebarImage=PARAICON
ShowTimer=no
DisableableFromShell=no
;SW.TimerVisibility=owner
SW.ShowCameo=no
SW.AutoFire=yes
SW.ManualFire=no
SW.AllowPlayer=yes
ParaDrop.Types=E1;DUM
ParaDrop.Num=0

SW.AlwaysGranted=yes
SW.InitialReady=yes
;ParaDrop.Aircraft=PDPLANE

[PDNINJAAmericans0]
UIName=NOSTR:
Name=Dummy Prerequisite Plane Americans0
Image=INVISOVXL;INVISO;INVISOPH
Strength=400
Category=AirLift
Armor=immortalpd
TechLevel=-1
Primary=ParaDropWeapon
Spawned=yes
LeadershipRating=10
Selectable=no
RadarInvisible=yes
Sight=0
Landable=no
MoveToShroud=yes
PitchAngle=0
Speed=10
Owner=British,French,Germans,Americans,Alliance,Canada,Japan,India,Italy,Brazil,Indonesia,Australia,Colossus,Russians,NorthK,Veitnam,China,Ukraine,Egypt,Iran,Pakistan,Saudi,Confederation,Africans,Arabs,YuriCountry,BruteGen,SlaveGen,ChemGen,AntonGen
Points=0
Bounty.Value=0
ROT=0
Crewed=no
Ammo=100
Explosion=
MaxDebris=0
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=0
DamageParticleSystems=
ImmuneToPsionics=yes
CanPassiveAquire=no
CanRetaliate=no
MoveSound=
DieSound=
CrashingSound=
ImpactLandSound=
Insignificant = yes
DesignatorRange=255
KeepAlive=no
HealthBar.Hide=yes

[BNINJASoulAmericans0]
LegalTarget=true
Strength=100
Armor=immortal
Prerequisite=
TechLevel=11
Owner=British,French,Germans,Americans,Alliance,Canada,Japan,India,Italy,Brazil,Indonesia,Australia,Colossus,Russians,NorthK,Veitnam,China,Ukraine,Egypt,Iran,Pakistan,Saudi,Confederation,Africans,Arabs,YuriCountry,BruteGen,SlaveGen,ChemGen,AntonGen
AIBasePlanningSide=0
AIBuildThis=no
Insignificant=yes
Invisible=yes
Unsellable=yes
Image=NCELLBUIDING
KeepAlive=no
BaseNormal=no
AttackFriendlies=yes
Selectable=no
HealthBar.Hide=yes
Name=Dummy Prerequisite : Americans0Soul

[SPAWNSWSoulAmericans0]
SW.NegBuildings=BNINJASoulAmericans0
LimboDelivery.Types=BNINJASoulAmericans0
SW.Shots=1
SW.Designators=PDNINJAAmericans0
LimboDelivery.IDs=00000
SW.RequiredHouses=Americans
SW.Deferment=0
SW.ShowCameo=no
SW.AutoFire=yes
SW.ManualFire=no
RechargeTime=0.01
SW.InitialReady=yes
SW.AllowPlayer=yes
Type=UnitDelivery
Action=ParaDrop
IsPowered=false
SW.AlwaysGranted=yes
SW.AITargeting=Base
Message.Launch=NOSTR:"Bninja Launched"

[PDNINJAAmericans1]
UIName=NOSTR:
Name=Dummy Prerequisite Plane Americans1
Image=INVISOVXL;INVISO;INVISOPH
Strength=400
Category=AirLift
Armor=immortalpd
TechLevel=-1
Primary=ParaDropWeapon
Spawned=yes
LeadershipRating=10
Selectable=no
RadarInvisible=yes
Sight=0
Landable=no
MoveToShroud=yes
PitchAngle=0
Speed=10
Owner=British,French,Germans,Americans,Alliance,Canada,Japan,India,Italy,Brazil,Indonesia,Australia,Colossus,Russians,NorthK,Veitnam,China,Ukraine,Egypt,Iran,Pakistan,Saudi,Confederation,Africans,Arabs,YuriCountry,BruteGen,SlaveGen,ChemGen,AntonGen
Points=0
Bounty.Value=0
ROT=0
Crewed=no
Ammo=100
Explosion=
MaxDebris=0
Locomotor={4A582746-9839-11d1-B709-00A024DDAFD1}
MovementZone=Fly
ThreatPosed=0
DamageParticleSystems=
ImmuneToPsionics=yes
CanPassiveAquire=no
CanRetaliate=no
MoveSound=
DieSound=
CrashingSound=
ImpactLandSound=
Insignificant = yes
DesignatorRange=255
KeepAlive=no
HealthBar.Hide=yes


[BNINJASoulAmericans1]
LegalTarget=true
Strength=100
Armor=immortal
Prerequisite=
TechLevel=11
Owner=British,French,Germans,Americans,Alliance,Canada,Japan,India,Italy,Brazil,Indonesia,Australia,Colossus,Russians,NorthK,Veitnam,China,Ukraine,Egypt,Iran,Pakistan,Saudi,Confederation,Africans,Arabs,YuriCountry,BruteGen,SlaveGen,ChemGen,AntonGen
AIBasePlanningSide=0
AIBuildThis=no
Insignificant=yes
Invisible=yes
Unsellable=yes
Image=NCELLBUIDING
KeepAlive=no
BaseNormal=no
AttackFriendlies=yes
Selectable=no
HealthBar.Hide=yes
Name=Dummy Prerequisite : Americans1Soul
SuperWeapons=SPAWNSW00Americans1,SPAWNSW01Americans1,SPAWNSW02Americans1,SPAWNSW03Americans1,SPAWNSW04Americans1,SPAWNSW05Americans1,SPAWNSW06Americans1,SPAWNSW07Americans1

[SPAWNSWSoulAmericans1]
SW.NegBuildings=BNINJASoulAmericans1
LimboDelivery.Types=BNINJASoulAmericans1
SW.Shots=1
SW.Designators=PDNINJAAmericans1
LimboDelivery.IDs=00008
SW.RequiredHouses=Americans
SW.Deferment=0
SW.ShowCameo=no
SW.AutoFire=yes
SW.ManualFire=no
RechargeTime=0.01
SW.InitialReady=yes
SW.AllowPlayer=yes
Type=UnitDelivery
Action=ParaDrop
IsPowered=false
SW.AlwaysGranted=yes
SW.AITargeting=Base


Now here is my country list!

[Countries]
0=Americans
1=Alliance
2=French
3=Germans
4=British
5=Canada
6=Japan
7=India
8=Italy
9=Brazil
10=Indonesia
11=Australia

12=Africans
13=Arabs
14=Confederation
15=Russians
16=NorthK
17=Veitnam
18=China
19=Ukraine
20=Egypt
21=Iran
22=Pakistan
23=Saudi

24=YuriCountry
25=BruteGen
26=SlaveGen
27=ChemGen
28=AntonGen

29=AntCountry
30=Colossus
31=placeholder

32=Americans2
33=Alliance2
34=French2
35=Germans2
36=British2
37=Canada2
38=Japan2
39=India2
40=Italy2
41=Brazil2
42=Indonesia2
43=Australia2

44=Africans2
45=Arabs2
46=Confederation2
47=Russians2
48=NorthK2
49=Veitnam2
50=China2
51=Ukraine2
52=Egypt2
53=Iran2
54=Pakistan2
55=Saudi2

56=YuriCountry2
57=BruteGen2
58=SlaveGen2
59=ChemGen2
60=AntonGen2

61=AntCountry2
62=Colossus2
63=pholder
64=Americans3
65=Alliance3
66=French3
67=Germans3
68=British3
.....
222=Colossus7
223=placeholder7
1000=GDI
1001=Nod
1002=Neutral
1003=Special



This is a helicopter only 0=Americans can build:

[SCOUT]
UIName=NOSTR:MD530 Scout
Name=Allied MD530 Scout
Prerequisite=GAWEAPWFPRE,AMERICANSONEPR


This is a tank only 32=Americans2 can build:

[GTNKM1]
UIName=NOSTR:M1A2 Abrams
Name=Delta Force M1A2 Abrams Battle Tank
Prerequisite=GAWEAPWFPRE,AMERICANSTWOPR





In spite being the same country according to RequiredHouses, the gameplay will show the player a unique experience.


The only thing I need to do is experiment with online. It works 100% fine with Skirmish and doesn't harm the game in anyway. I'd like to know how it could. People regularly comment how this is "bad" but never do anything but speculate without any data. So if you ever come across issues or want to test online multiplayer, give me a shout. However, at the least, offline skirmish for me currently has a lot of playable countries and I dig it.

One concern is everyone believes moving the
1000=GDI
1001=Nod
1002=Neutral
1003=Special
past 32 index. In theory, doing this will cause them to break online multiplayer and cause you to not be able to ally with players. However, the community has been moving them past 32 for over a decade, so not sure how true this is, but even if it is it wouldn't be difficult to have 28 countries with infinite clones that are significantly altered with dummy prerequisites instead, so I don't know if I believe this is a real issue either. It's still something to think about though.


Another issue is CnCNet. While regular game launcher flawlessly supports this many countries, CNCNet doesn't give us a scrollbar when selecting countries, so having too many countries will make it difficult to select countries dropboxing off screen, thus the mouse wheel is necessary to navigate. There doesn't appear to be any intention to fix this since my mod is currently the only one with this issue and mine isn't by any means likely to ever be finished lmao.


The next issue is the jank ass AI. I have to make now unique dummy objects for EVERY possible building combination with the unique country dummy object too for now AImd.ini also has a problem, it too tries to use Countries as a requirement which is no longer how we segregate things. This is a huge mess, very tedious, but there is also a new Phobos feature that's fairly new and experimental but overal positive reception which allows more than one structure as a requirement for AI. There is also the New AI Teams Select that forces AI to honor Prerequisites!
https://github.com/Phobos-developers/Phobos/pull/696
https://github.com/Phobos-developers/Phobos/pull/810

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Tue Jul 11, 2023 8:19 am    Post subject: Reply with quote  Mark this post and the followings unread

I see. Thanks so much for the detailed explanation and example! I'm currently not concerned with any online multiplayer implications as I'm only really working on private projects right now. I just like the modern interface that the CnCNet client allows for.

The AI issue could be more of a concern though as I would want a moderately functional AI. It's good to hear there's a solution in the works for that though.

I'll have to give your methods a try. Before I realized how constricting the country limit could be, I was planning to go ham on creating new countries for a sort of "Worldwide Warfare" style mod where that was the main gimmick. It sounds like I'll have to give it a shot, though maybe after Phobos has the AI issue better handled.

Back to top
View user's profile Send private message ModDB Profile ID
wardeathfun
Commander


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Tue Jul 11, 2023 5:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Like I said, it may be tedious but there is already a solution. Have a superweapon constantly check if a building exist and place a dummy. In theory, you could have a dummy that says a warfactory exists, you already know about having a country's ID existing, you could easily give these dummy buildings superweapons which also spawns dummy objects which means unique dummy objects. You can have a dummy object with both a country ID and warfactory tag on it, which you would use for AI Triggers for when you want them to require both a warfactory and be a specific nation. Because you can customize armor types to such a strong degree and make superweapons that fires on units that have said armor, you could also spawn dummy objects that state a certain enemy unit or structure exists so now you have a dummy object you can have another dummy object check for. You see where I'm going with this, lots of dummy objects.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [9 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.4463s ][ Queries: 11 (0.2856s) ][ Debug on ]