Structures by design

For code related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Structures by design

Post by aubergine »

@Reg312: It will be fairly trivial for JS-based AIs to be adapted to template-based building, so long as the JS API provides a suitable update to the orderDroidBuild() function.

As for WZscript based AIs, that could be another matter entirely, although I believe most WZscript stuff is being ported over to JS (eg. tutorial and some campaign stuff as well I think). The only one not yet ported, as far as I know, is the Nexus AI.. but IMHO it should be deprecated and replaced with NullBot.

@Emdek: I hate the fact that I end up with herds of crufty research items and then buildings in my build menu. I'd happily lose that and have to start from scratch designing my own templates :) And, while on the subject, I'd like cyborgs to work the same way please :)
"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 wrote:I hate the fact that I end up with herds of crufty research items and then buildings in my build menu. I'd happily lose that and have to start from scratch designing my own templates :) And, while on the subject, I'd like cyborgs to work the same way please :)
Yes, those would be default, but with possibility to delete them once and for all. ;-)
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 »

If I can delete them then that's good enough for me. It will give me added satisfaction pressing the delete button and waving them good riddance after all these years :)
"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 »

:-D

Also I would like to have possibility to get rid off that default Truck. ;-)
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 »

Hrm, not sure about the default truck... That might be one exception to the rule. I tend to just edit it in-game to have better body and hover prop.

Out of interest, how will the structure designer affect campaign?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Structures by design

Post by aubergine »

Ooh, just one other thought - you could have templates that are not available yet shown greyed out (similar to what is planned with droids that need factory modules / etc).

This could then be extended to having option to "research to this" maybe - in other words, get some assistance researching the right things to make it available?
"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 »

Deleting only if you want, just for consistency. ;-)

It shouldn't affect current ones, I would like it as something for next ones (like technology to enable them or from start).

Research to is "my" idea in "Ideas and Suggestions". ;-)
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.
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: Structures by design

Post by Reg312 »

aubergine wrote:Ooh, just one other thought - you could have templates that are not available yet shown greyed out (similar to what is planned with droids that need factory modules / etc).
its possible, but i dont think we need this :)
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

Here is that topic about "research to" (that was proposed later compromise, to don't make it too easy):
viewtopic.php?f=30&t=8892

For graying out...
Why not, maybe as separate list or shown at end of the list.
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.
Jorzi
Regular
Regular
Posts: 2063
Joined: 11 Apr 2010, 00:14

Re: Structures by design

Post by Jorzi »

Being able to delete the default truck is not a good idea imo, it's the only design you can build in the beginning and if you lose your current trucks before building a command center, you're dead.
ImageImage
-insert deep philosophical statement here-
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

Jorzi, yes, for MP this is issue, for SP not at all.
Also this would be only possibility to be consistent, and in design screen there should be then option to restore all deleted "initial" templates (initial defaults, but without removing custom ones), like "Restore defaults".
Also this could be done only if structures design would be in main branch and would have initial templates (equal to those which currently need to be researched separately) for "backward compatibility".
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.
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: Structures by design

Post by Reg312 »

Emdek wrote: Also this could be done only if structures design would be in main branch and would have initial templates (equal to those which currently need to be researched separately) for "backward compatibility".
if i understood correct, you mean "backward compatibility" == more easier adaptation of player to new game duty: design structures, is it?
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Structures by design

Post by Emdek »

Reg312, yes, but not only.
Some will simply prefer this approach, since not all use stored templates (I think that I'll finally start to use them for SP...).
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.
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: Structures by design

Post by Reg312 »

Time to describe my method of limiting weapons for certain structures
for example: we dont want see weapons from fortresses on bunker bodies

1) Added size parameter to structure bodies
*note1: each structure body can have any size, even string like "i dont know size"
set of sizes for structures: METAL_TOWER, HARDCRETE_TOWER, HARDPOINT, FORTRESS, BUNKER_INSIDE, BUNKER_ROOF, EMPLACEMENT, ARTILLERY_EMPLACEMENT, AA_EMPLACEMENT, PIT

2) Added parameter "weaponDesignType" to list of weapons
*note1: each weapon can have any design type (any string)
set of weapon design types: AA, CYBORG_LIGHT, CYBORG_HEAVY, DIRECT_LIGHT, DIRECT_MEDIUM, DIRECT_HEAVY, DIRECT_SUPERHEAVY, INDIRECT_LIGHT, INDIRECT_MEDIUM, INDIRECT_HEAVY, VTOL_LIGHT, VTOL_HEAVY, MISC

3) Added JS function (as trigger) IsComponentFits
if function returns "true" this means component can be added to current design

Code: Select all

function eventIsComponentFits(template, component)
{
	switch(component.componentType)
	{
......................................................................
	case 8: //COMP_WEAPON
		if(template.Body.size == "BUNKER_ROOF" || template.Body.size == "BUNKER_INSIDE")
		{
			if(component.weaponDesignType != "DIRECT_LIGHT")
			{
				return false;
			}
		}
		break;	  	  
	}
	return true;
}
wz2100-20120318_035920-Sk-Rush.png
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: Structures by design

Post by Giani »

You finished your mod?
This thread doesnt have activity since some time...
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
Post Reply