Page 17 of 24

Re: New Dynamic Script Ideas

PostPosted: 08 May 2014, 09:56
by andreus
Actions.AddSolidPlan(aPlayer, aType, X, Y) will be great.
This could be madness :D

Re: New Dynamic Script Ideas

PostPosted: 12 May 2014, 17:03
by Michalpl
New idea for Dynamic scripts it should be called action.replacetitle usage should look like this 1 2 cords and 3 numer of the tile in the tileset 4 should be something like increase and decrease the tiles hight 5 tile rotation 6 random tile rotation if on it should force 5 to have random rotations if off it shouldn't affect 5.
By that script we could make water bridges, infinite; Coal,Iron,Gold,Stone make something like rain? that increase water but there should be something to keep that titles clean i mean no buildings, make dynamic volcano that looks cool, dynamic maze, mazes, something like even breakable wooden bridges or even ice
and lot more...

Re: New Dynamic Script Ideas

PostPosted: 12 May 2014, 17:55
by Skypper
By that script we could make water bridges, infinite; Coal,Iron,Gold,Stone make something like rain? that increase water but there should be something to keep that titles clean i mean no buildings, make dynamic volcano that looks cool, dynamic maze, mazes, something like even breakable wooden bridges or even ice
and lot more...
I thought this was already asked and the stormattack if troops are lured to, like in tsk.

I think the stormattack is a good plan and the dynamic title to.
But i don't think it will be implemented on a nice way.
if you want to change a area of 10x10 you nee 100 lines of code.
if you want to do something usefull with it it soon will be around a 400+ titles to make it look nice to.
So it won't be used very much i think, it will properly result in a lot of wrong title connections i am afraid.
So that needs to be considered i think

Re: New Dynamic Script Ideas

PostPosted: 12 May 2014, 18:20
by Michalpl
Yea but the .script file has unlimited size right?

Re: New Dynamic Script Ideas

PostPosted: 12 May 2014, 19:48
by Skypper
euhm, I don't know but I have seen quite large scripts.
I meant, that I was afraid it will result in very ugly maps, with a lot of wrong title connections, bugs and or unplayable.

Re: New Dynamic Script Ideas

PostPosted: 13 May 2014, 21:06
by andreus
one more script suggestion from my friend - is it possible to add road plans from one house to another, like AI does? :P
smth like Actions.PlanAddStreet(Player, X1, Y1, X2, Y2) could be easier than tons of "for X := X1 to X2" cycles ;D

Re: New Dynamic Script Ideas

PostPosted: 13 May 2014, 22:33
by RandomLyrics
one more script suggestion from my friend - is it possible to add road plans from one house to another, like AI does? :P
smth like Actions.PlanAddStreet(Player, X1, Y1, X2, Y2) could be easier than tons of "for X := X1 to X2" cycles ;D
that would be nice :>

Re: New Dynamic Script Ideas

PostPosted: 14 May 2014, 01:57
by Lewin
one more script suggestion from my friend - is it possible to add road plans from one house to another, like AI does? :P
smth like Actions.PlanAddStreet(Player, X1, Y1, X2, Y2) could be easier than tons of "for X := X1 to X2" cycles ;D
That's a good idea. Lets call it Actions.PlanConnectRoad(X1, Y1, X2, Y2): Boolean (returns false if it is not possible to connect the road between those two tiles).

Re: New Dynamic Script Ideas

PostPosted: 14 May 2014, 12:43
by Michalpl
Add it too for AI to connect other storage houses!

Re: New Dynamic Script Ideas

PostPosted: 14 May 2014, 12:55
by andreus
Some new scripts have been added:

6251 More options for AI: Actions.AIDefendAllies, Actions.AIAutoAttackRange, Actions.AIStartPosition
6277 Actions.GroupBlockOrders
6284 States.HouseTypeMaxHealth
6285 States.HouseBuildingProgress
6287 HouseMarketFromWare, HouseMarketToWare, HouseMarketOrderAmount (query what the player has ordered at a market)
6288 Actions.GiveHouseSite

For more info, read wiki ;)

Re: New Dynamic Script Ideas

PostPosted: 14 May 2014, 13:16
by Michalpl
andreus 6251r this commands were in game AIStartposition its for the AI auto attack
but something usefull that you have made is States.MarketFromWare, ToWare, OrderAmount. it will be probably used for AI simple trade mechanism

Re: New Dynamic Script Ideas

PostPosted: 14 May 2014, 18:23
by andreus
AI dynamic scripts can be useful too, for example you can change AI start position to make attack more difficult to stop:

if States.GameTime mod 12000 = 0 then Actions.AIStartPosition(aPlayer, States.KaMRandomI(100), States.KaMRandomI(100))

Re: New Dynamic Script Ideas

PostPosted: 16 May 2014, 11:42
by andreus
More additions:

6297 Actions.HouseAddBuildingProgress
6298 OnHousePlanRemoved
6301 added OnPlanRoadFieldWinefieldRemoved; OnPlanRoadFieldWinefield renamed to OnPlanRoadFieldWinefieldPlaced
6303 Actions.PlanConnectRoad(Player,X1, Y1, X2, Y2): Boolean

Re: New Dynamic Script Ideas

PostPosted: 16 May 2014, 14:09
by sado1
6301 added OnPlanRoadFieldWinefieldRemoved; OnPlanRoadFieldWinefield renamed to OnPlanRoadFieldWinefieldPlaced
Those two just won the most ridiculous KaM scripting function award... Make it shorter, damn it! ;)

Re: New Dynamic Script Ideas

PostPosted: 16 May 2014, 14:46
by andreus
LOL

there are 6 events, called like OnPlanRoadPlaced ;D
I just wrote "all-in-one" names


EDIT: more scripts added

6309 Actions.RemDefensePosition(PlayerID, PositionID)
6311 Actions.GiveRoad(aPlayer, X, Y: integer); - add finished road
6311 Actions.GiveWinefield(aPlayer, X, Y: integer); - add finished winefield
6311 Actions.GiveField(aPlayer, X, Y: integer); - add finished field
6313 Allow to query count of placed house plans