User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

ChangeStrucType

Fri Oct 31, 2008 2:33 pm

Hi chaps, can anyone speed me on my way by answering this?

If I have $Lackawanna as the location id of the StartEvent
I assume I wouldn’t need to include it in a ChangeStrucType command?

ChangeStrucType $Village|$Fort|null| REG $Lackawanna

I would need to keep REG but not $Lackawanna?

What is the null for in the above ChangeStrucType command?

If I want to remove a Structure_Stockade from the game would I be able to do this using ChangeStrucType?

Many thanks,
Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Fri Oct 31, 2008 2:40 pm

Both use same syntax...
Structure force pool is only available for VGN+, the rest can be used elsewhere.

The purpose is to allow changes from technologies or doctrines mostly. Taking the VGN example, if you have Early Industrial Factories and pay for the conversion, then you have to change both on map and in the force pool the 'Early factory Structure Type' to the 'Late Industrial' type.

The same thing apply on units. If you have units which represents 1850 Infantry Corps, you want them to change in due time to 1870 Infantry Corps. This is necessary so that when they get replacements, they get the right model.

The syntax is:

ChangeUnitType = <OldUnitDef>;<NewUnitDef>[;FP][;REGorAREA_AreaUID]

all params can go in the first column in excel, separated by a pipe |
[] means optional
If REG is specified, then the script expect that a region was selected before (with SelectRegion)
if AREA is specified, then follows an area UID
if nothing is specified, then it applies on the whole MAP.


examples:
ChangeUnitType = $Inf1850|$Inf1870
it will changes on the whole map all units (not the actual elements in it!) to this type.
ChangeUnitType = $Warriors|$Warbands|FP|Area $aeaWest
It will change all Warriors in the West area into Warbands, including in the force pool.
ChangeStrucType = $Redoubt $BrickFort
Will change all redoubts on map with BrickForts.


[color="Red"]ChangeStrucType = <OldStructDef>;<NewStructDef>[;FP][;REGorAREA_AreaUID][/color]
You must repeat the REG portion, I think.
NULL is placeholder for the [VGN only] FP variable. Probably not needed.

Dunno if you can remove structure with it! Try it with NULL as second parameter :blink: [ducks and runs for cover]
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Nov 01, 2008 10:23 am

No I don't think we have a command to remove a structure, would be handy though...
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Sun Mar 29, 2009 12:30 pm

It would still be nice to have a way to remove a structure... :D

...and, a way to rename a structure by event ;) :love:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Mar 30, 2009 5:32 pm

Remind me of that in a fortnight then, I'm too busy and late right now. ;)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
paw1776
Captain
Posts: 192
Joined: Thu Mar 26, 2009 5:29 am
Location: Melbourne, Australia
Contact: Website

Thu Jun 04, 2009 11:01 am

Hello,

I am looking to do the same thing. I want to change a settlement into a City.

If I want my City to be level 3, I assume I would have to remove structure
1st.

Whereas, if I went from a level 1 Setlement to Level 1 City, I can use ChangeStrucType.

Which would work, if there is the ability to increase a City from level 1 to level 2 or 3 or 4.

1st Event:
Create Settlement (once discovered) CreateStruc
Upgrade Settlement to City (once settled) ChangeStrucType
Upgrade City to Level 3. ???? Remove then CreateStruc? Or is there another way?


PS - For POCUS - Did you do a remove command as suggested here (and rename)? :w00t:

User avatar
paw1776
Captain
Posts: 192
Joined: Thu Mar 26, 2009 5:29 am
Location: Melbourne, Australia
Contact: Website

ChangeStrucType - Remove Structure

Fri Jun 05, 2009 9:49 am


User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Fri Jun 05, 2009 11:10 am

[color="Blue"]The best place to bump a thread is in the thread itself. Merged :) [/color]

Also, I know that Pocus is quite busy these days, so I'm afraid it can be good to allow for more than a day to get a reply.
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE
Visit AGEWiki - your increasingly comprehensive source for information about AGE games
[SIGPIC][/SIGPIC]
[/CENTER]

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Fri Jun 05, 2009 11:56 am

Once the 1.05 version is ready we will have ability to remove a structure.
Thus removing and 'rebuilding' will allow rename and upgrades:

EvalRgnOwned = $Tajacook
MinDate = 1755/09/01
EvalRgnStruc = $Tajacook;FACALL;STRUCDEF $Village
EvalRgnStruc = $Tajacook;FACALL;STRUCDEF $Fort;NOT
CountUnits = $Tajacook;-1;$GBR;-1;>=;4

Actions
[color="Red"]RemoveStructure = ByDefUID $Village;ALL;ANYFAC[/color]
SelectFaction = $GBR

CreateStruc
SetType = $Fort
SetLevel = 1
SetName = Fort Edward
Apply


Hilighted is new command for 1.05

RemoveStructure = <SelectionType(=ByDefUID or ByAttrib or ByKind) Value>;<ALL_OR_RANDOM_KEYWORD>;<ANYFAC_OR_SINGLEFAC_KEYWORD>
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
paw1776
Captain
Posts: 192
Joined: Thu Mar 26, 2009 5:29 am
Location: Melbourne, Australia
Contact: Website

Sat Jun 06, 2009 12:14 am

Lodi,

Excellent!!!! :thumbsup:

Thx again!

Too Cool!

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Jul 09, 2009 9:47 am

Can anyone confirm if I understand the RemoveStructure syntax correctly :-

Command: RemoveStructure
Param0: $Village|ALL|IND
Param4: $Region

What does the ALL do?

I really need to change the control of a structure but I don’t think there is a way to do this?
Only the region control can be changed I think with SetControl – so instead I can delete the structure.

Thanks, Chris

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Thu Jul 09, 2009 7:38 pm

I gave it a try but got an error. Has anyone done this successfully?
As far as I understand I have 3 parameters $Village, ALL and IND

Line 3070: => RemoveStructure, need to have 3 parameters: RemoveStructure = <SelectionType(=ByDefUID or ByAttrib or ByKind) Value>;<ALL_OR_RANDOM_KEYWORD>;<ANYFAC_OR_SINGLEFAC_KEYWORD>

Cheers, Chris

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Thu Jul 09, 2009 11:19 pm

Hobbes wrote:I gave it a try but got an error. Has anyone done this successfully?
As far as I understand I have 3 parameters $Village, ALL and IND

Line 3070: => RemoveStructure, need to have 3 parameters: RemoveStructure = <SelectionType(=ByDefUID or ByAttrib or ByKind) Value>;<ALL_OR_RANDOM_KEYWORD>;<ANYFAC_OR_SINGLEFAC_KEYWORD>

Cheers, Chris


Command: RemoveStructure
Param0: [color="Red"]ByDefUID[/color] $Village|ALL|[color="red"]$[/color]IND
Param4: $Region
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Fri Jul 10, 2009 8:11 am

Hi Lodi, I tried :-

Param0: ByDefUID $Village|ALL|$IND
Param0: ByKind $Village|ALL|$IND
Param0: $Village|ALL|$IND

But all of these variations still give the same error I had above.

Cheers, Chris

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Jul 10, 2009 4:22 pm

I believe it is my fault... the command has an erroneous check in the current version.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Fri Jul 10, 2009 6:30 pm

:coeurs:

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon Jul 13, 2009 3:01 pm

Do you want a new executable for your tests?
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
lodilefty
Posts: 7616
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Mon Jul 13, 2009 3:25 pm

Pocus wrote:Do you want a new executable for your tests?


How about part of new beta patch? :D
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Hobbes
Posts: 4438
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Sat Aug 01, 2009 8:55 am

I missed the last two replies. Lodi - is this fix in the new 1.05 RC6 beta?

Cheers, Chris

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 3 guests