Structures by design

For code related discussions and questions
Post Reply
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Structures by design

Post by Reg312 »

Hello.
i want implement idea "Designing structures the same way units are designed"
seems it is not complex but..
1) may be someone already working on it
2) may be something should be changed soon (like format of body stat file)
3) may be it will useless because <...> ?

Current plan (updated)
*design only defenses (not factories and etc)
*use droid templates for strctures
*structure stat created in runtime from template
*structure bodies: body.ini with additional parameters (heigh, weight, type of hardcrete and etc)
body size => body type (LIGHT, MEDIUM, HEAVY, DEFENSE_SOFT, DEFENSE_MEDIUM, DEFENSE_HARD)
*Add field "WEAPON_TYPE" into weapon stats
types of weapons: (COMMON, VTOL, CYBORG)

*structure propulsion type: constant dummy
propulsion type for strctures: "defense"
*propulsion button wil be invisible for structure bodies
*network: functions for sending structure stats and store with some kind of multiplayer id
*research: just adjust data (add research components)
*UI: need 4 weapon buttons (i want fortress with 4 weapons)
*Aviable weapons for structures: file aviabledefenses.ini
All aviable defenses in designer should have same price and other parametes as in current WZ in strctures.txt
if this file aviabledefenses.ini does not exist then all combinations of defenses will be aviable
in file aviabledefenses.ini also will be stored price,HP,buildtime of structure as in current version of WZ

in UI should be shown corret price and HP (or just put it to "-" for first time)


some thoughts
Idea from Iluvalar: make strcture damage formulas working like droid damage formulas.
status of idea: interesting, but too many changes, too soon. canceled
*Strcture Propulsion => Strcture Strength (SOFT, MEDIUM, HARD, BUNKER)
*all parameters of structure should be calculated as parameters of droid with different propulsion type
*list of aviable propulsion => bodypropulsion.txt
for 1 structure body only one propulsion.. (bunkers will have "bunker" propulsion and etc.)

some thing which should be decided before coding:
1) How restict weapons on different strctures
- restrict XSuperCannon on any bodies except fortreses
- how make artillery unusable on bunkers (to not break current "balance")


ToDo list:
- add some predefined templates in JS to make players easier to adapt to mod
*this templates should provide readyforuse structures in T2 and T3
- remove research items for defenses in T2 and T3 mode
- check pointer pDisplayedName (forgot to free it somewhere?)
- solve issue: designed structures on map (map editor!)
- savegames dont work
- more multuplayer tests
- flashlight (removed from redundant, but it still hides when i get pulse laser)
- check warnings in log "[getResearch] Unknown research - R-Struc-VTOLFactory-Upgrade03" (T3 mode?)

Change log:
- calculation of defenses price moved to JS
- fixed stored templates for structures
- added weaponPriceModifier for structure bodies (fit current balance)
- implemented bunker with invisisble machineguns
- make Assault Gun still exist when we got Twin asault gun (need for AG bunkers)
- removed redundant components from research: Heavy Machinegun, Needle Gun, Flashlight
this weapons have "light" size and can be placed on bunkers and towers, so we dont want remove them when more advanced weapon researched
- added limits for strcture bodies (added js-function is ComponentFits, added weaponDesignType, added more body sizes)
- adjusted formulas for HP, Price and build points for designed structures
- removed prresearches for hardpoints and towers, so players dont see hardpoints and towers researches, while AI can use it
-
Last edited by Reg312 on 01 Apr 2012, 12:10, edited 28 times in total.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Structures by design

Post by Per »

1) To my knowledge, nobody is working on it.

2) I just rewrote the body stat file yesterday... :-)

3) I think it is a good idea. It is not an easy place to start to get into the Warzone source, though. It _is_ complex. But it will teach you a lot, so why not.
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Structures by design

Post by Iluvalar »

Hi reg312. I didn't worked on it, but i'm surely tough about it. Here is how it should work IMHO.

**The struture bases (bunker, hard, medium, soft) should be a propulsion type in all regard. RIP structuremodifiers.txt

**Fix the propulsion to remove that "100+X" everywhere, so we can realy describe the structure base to have 0 engine. Not 100+0.

**The bodypropulsionimd.txt should be reviewed so one propulsion type can only give one result for a single body. We have wheel01,wheel02,wheel03 that repeat unnecessary. It should be stated from now on that a body that is NOT linked to a propulsion in that file, can't fit on that propulsion anymore. So if i chose a "bunker" propulsion, i'll only have "structure" body choice.

**Body for structures...

**Merge all non-weapon "turret" into a single file (sensor+repair+brain+construct) they all now have a special function and some variable parameter (range for sensor, build point for construct, etc...). They also acquire a new parameter for the number of "slot" necessary. ie. Transporting borgs apparently need more slot and tanks even more. Such special skill.txt will therefore count as well "research", "factory-tank", "factory-cyborg", "command center". And one will even be able to design such buildings.

**terraintable.txt should be the decisive part for which tile in impassable or passable for any propulsion. Which will give us the capacity to create the pilori propulsion/structure that can be built on water and we will be able to make a shipyard skill on it. And we can describe cliffclimbers.

**New flag in propulsion to tell what skill can produce/build them. We should be able to make multiple choice there. So we can describe the structure to be buildable only by the skill owned by the trucks and engineer. same for cyborg, naval, vtol...

**New flag in body.txt to tell what skill can produce/build them. So we need the skill "factoy-heavy" which is only on the module2 of the factory to produce heavy tanks.

**fix the borgs ! at the same time. So their body turn. Instead of that weird hack where the legs are the body and the body are the weapon mount. So we'll be able to design borgs correctly as well :) .

That's my great unification plan for now. You are not forced to do everything in one shot, but it's good to have a main plan and know where we are going to.

edit: might want a bodySkillIMD.txt . same as bodypropulsion. So you could make the CC look like a CC and the research look like a research. At least, for the launch of it. Before our artists find a more elegant way to depict all skill on all structure body.
Heretic 2.3 improver and proud of it.
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: Structures by design

Post by Reg312 »

i reviewed some places in code days ago and started work, but stopped because i need main plan

current Plan
later i'll make it more certain, now it is just first estimation
*design only defenses (not factories and etc)
*structure templates: list of templates
*new structures: structure stat created in runtime from template
*structure bodies: body.ini with additional parameters (heigh, weight, type of hardcrete and etc)
problem: information will be doubled in structures.txt and body.ini
body size => body type (LIGHT, MEDIUM, HEAVY, DEFENSE_SOFT, DEFENSE_MEDIUM, DEFENSE_HARD)
*structure propulsion type: constant dummy
*propulsion button wil be invisible for structure bodies
*network: functions for sending structure stats and store with some kind of multiplayer id
*research: just adjust data (add research components)
*UI: need 4 weapon buttons (i want fortress with 4 weapons)
problem: need "stucture only" weapons for current fortresses
problem: need "balance" because in current game "weapon price" != "price of weapon on structure"
to be continued...

Iluvalar
i cannot discuss about many of ideas.. need thinkng and when i'll be more familar with code then i'll try make whole picture in my mind

what i think can be done:
1) remove structuremodifiers.txt
rename propulsion type => "unit base" or something like that
use "unit base" as reference in weaponmodifier

bodypropulsionimd.txt - i think what wheels1 can have different model than wheels2, so need another IMD for it
i dont know how that IMD works

2) Design cyborgs - yes, and i dont see what problem with it, what make impossible to design cyborgs
but, we need upgrade UI, because cyborgs have another weapons
idk why cyborgs was made as non-designable, i need know why
Per wrote: It _is_ complex. But it will teach you a lot, so why not.
i suspect you have more clear picture, may be you have good ideas for me (how it all should work in code) :)
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

Looks fine for me, especially as I've postulated some of that recently (AFAIK on IRC during discussion). ;-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Structures by design

Post by aubergine »

Iluvalar wrote:**The struture bases (bunker, hard, medium, soft) should be a propulsion type in all regard. RIP structuremodifiers.txt
The structure base should surely be a body, not a propulsion? Structures have no propulsion, they don't move around the map.

EDIT: Or if they do need propulsion to be consistent with everything else, then it should be "Static" propulsion or something like that?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Structures by design

Post by Iluvalar »

different structure types (bunker, hard, medium, soft) have different weapon modifiers. So to make it constant. Such should be considered as a propulsion. Bunkers are weak to flame like cyborg legs, and hardpoint are resistant to flame like tracks. It would be easier for the player to understand the weapon modifier mechanic this way. And once he will fold his mind to that idea, it will be easier for crab as well, because he will be able to use the droid formula instead of making a new structure mechanic.
Heretic 2.3 improver and proud of it.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

I would say that probably turrets should have indicating on which structures they could be put, as currently it doesn't translate that way (or we want much more possibilities?).
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Structures by design

Post by aubergine »

@Emdek: I'd certainly like to be able to put turrets on more types of structure. For example, I'm always annoyed that I can't put a stormbringer on a hardpoint, etc.

@Iluvalar: Is there some word, other than "propulsion" that would work for both structure foundations and droid propulsion? Because "propulsion" just doesn't make sense in terms of a structure (although I can see why using that element works well from game mechanics perspective).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

aubergine, well for now it is planned to be exactly as it is now possible, but small additions shouldn't hurt. ;-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Structures by design

Post by Shadow Wolf TJC »

Iluvalar wrote:different structure types (bunker, hard, medium, soft) have different weapon modifiers. So to make it constant. Such should be considered as a propulsion. Bunkers are weak to flame like cyborg legs, and hardpoint are resistant to flame like tracks. It would be easier for the player to understand the weapon modifier mechanic this way. And once he will fold his mind to that idea, it will be easier for crab as well, because he will be able to use the droid formula instead of making a new structure mechanic.
To my knowledge, kinetic/thermal armor (which does vary from structure type to structure type) was traditionally determined by the unit's body type, while unit type (Soft, Medium, Hard, and Bunker) was traditionally determined by the unit's propulsion type. (HP was determined by both the body and propulsion type.) Why not create 1 propulsion type for each of the structure types? That way, we can choose our structure bodies, and then have the proper propulsion type automatically chosen.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Structures by design

Post by Iluvalar »

Here is a first proto reg312 :)

Please note how buggy it is :
*I needed to use the naval propulsion for the bunkers as an exemple
*There is a small "what is that" ? in the structure bodies that is needed for the units to target my structure
*We need a way to depict materials in the body screen
*Many structures have no possibilities (like wooden hardpoints), and should be removed to the list
*Even with engine at 0. The units move, we need to tech the game about speed 0 :D.
*I used a little hack by replacing the body by an close to invisible pie. We need a way to adjust connectors correctly lol.
*probably more...

but look, the templates are already built, and they are calculated already using the droids interface. I think it's the way to go.
Attachments
structExp.wz
(48.18 KiB) Downloaded 429 times
wz2100-20120208_181426-Sk-Rush.jpg
Heretic 2.3 improver and proud of it.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Structures by design

Post by aubergine »

I'd love to see a youtube video of the structures moving across the map. Need to capture that for prosperity so that future generations of warzone hackers can see what they missed LOL
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21
Contact:

Re: Structures by design

Post by effigy »

Sweet :) I think this is an awesome idea, and I recall vividly it been discussed in the past.

Also discussed was instead of designing structures the "propulsion" type would be toggled in the build menu by right clicking. This would mean you don't design anything, but instead research a turret + hardcrete and you'll have all possibilities prebuilt. The choice there is which "propulsion" type to show in the build menu first.

Something that should be discussed either way is how should this affect research? Should bunkers require more hardcrete upgrades than hardpoints -> towers to design?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: Structures by design

Post by Iluvalar »

hint hint : structExp.wz is actually a mod.. you can try by yourself ;).

Effigy, The way I did it, you have different material as body wooden,hardcrete, plastcrete, plasteel and you have different "propulsion" bunker, tower, hardpoint, emplacement...

So we could distribute all the piece along the game without too much difficulty. We could reproduce the same kind of progression we already have.
Heretic 2.3 improver and proud of it.
Post Reply