Posted: Sun Jul 09, 2023 1:39 am Post subject:
Using 0x0 structures and Ares UnitDelivery to create upgrades
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. QUICK_EDIT
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. _________________
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. QUICK_EDIT
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. QUICK_EDIT
Joined: 01 Feb 2007 Location: Las Vegas, Nevada, USA
Posted: Mon Jul 10, 2023 6:04 am Post subject:
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!
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. QUICK_EDIT
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. QUICK_EDIT
Joined: 01 Feb 2007 Location: Las Vegas, Nevada, USA
Posted: Mon Jul 10, 2023 11:34 pm Post subject:
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.
[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 QUICK_EDIT
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. QUICK_EDIT
Joined: 01 Feb 2007 Location: Las Vegas, Nevada, USA
Posted: Tue Jul 11, 2023 5:28 pm Post subject:
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. QUICK_EDIT
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