Adding new functionality to engineers...?
Moderators: Slitherine Core, BA Moderators
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Adding new functionality to engineers...?
Hey guys,
I was thinking about combining some of Enric's great work on adding functions to engineers, with Amaris' awesome Naval Academy mod that's beginning to simulate naval/marine Pacific warfare.
Is it possible to enable engineers to terraform? ie. Can I set up a function that permits an engineer to turn Guadalcanal jungle into mud? (one turn). And then turn mud into mud with a track (one more turn).
So it would take one engineer two turns to turn one-square of impenetrable Pacific jungle into a muddy track that vehicles could use...
I was thinking about combining some of Enric's great work on adding functions to engineers, with Amaris' awesome Naval Academy mod that's beginning to simulate naval/marine Pacific warfare.
Is it possible to enable engineers to terraform? ie. Can I set up a function that permits an engineer to turn Guadalcanal jungle into mud? (one turn). And then turn mud into mud with a track (one more turn).
So it would take one engineer two turns to turn one-square of impenetrable Pacific jungle into a muddy track that vehicles could use...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
Seen in autodoc:
//returns the ID of a given pairing of set/tile. -1 means the tile doesn't exist. These are the internal folder/tile names, not the displayed localised names. NOTE: this will not be a constant as game data and custom data changes, so don't rely on it.
GetTileID(set, name)
//place a tile in its layer, replacing anything else there. Rotation is [0,3]
PlaceTile(x, y, id, rotation)
//return the id of the tile on the tile at the layer. Returns -1 if nothing there.
GetTileOnTile(layer, x, y)
So... Why not?
//returns the ID of a given pairing of set/tile. -1 means the tile doesn't exist. These are the internal folder/tile names, not the displayed localised names. NOTE: this will not be a constant as game data and custom data changes, so don't rely on it.
GetTileID(set, name)
//place a tile in its layer, replacing anything else there. Rotation is [0,3]
PlaceTile(x, y, id, rotation)
//return the id of the tile on the tile at the layer. Returns -1 if nothing there.
GetTileOnTile(layer, x, y)
So... Why not?
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
Did you think to something like this:
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Exactly like that!
Although perhaps being more specific on the action, for example "cut trees" (to turn jungle or forest into mud), and "lay road" (to place a track in the mud).
A brown icon with a wiggly track through it would be awesome...
Although perhaps being more specific on the action, for example "cut trees" (to turn jungle or forest into mud), and "lay road" (to place a track in the mud).
A brown icon with a wiggly track through it would be awesome...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
This was an extremely quick test to evaluate the feasibility of thing.
To cut down trees (object) it must also be possible.
Against by road construction may be more complex. Because of the orientation of the road, turns, and road crossing. Not impossible (see my plugin) but not simple.
We can even imagine engineers creating fortifications, like sandbag, open bunker or why not bunker! But also tank trap (or remove it.)
Not need more coder for BA2?
To cut down trees (object) it must also be possible.
Against by road construction may be more complex. Because of the orientation of the road, turns, and road crossing. Not impossible (see my plugin) but not simple.
We can even imagine engineers creating fortifications, like sandbag, open bunker or why not bunker! But also tank trap (or remove it.)
Not need more coder for BA2?
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Hmmm... Yes, you're right. A challenge with roads might be orienting them with their neighbours... Easy. Don't... Maybe terraform from jungle/forest to mud, then mud to dust instead? Just tell the BA engine to call our road terrain type "rough tracks" instead of "dust". No more requirement for orientation... Jungle/forest and mud don't permit vehicles, but dust already does (and it's colour is similar to tracks)... One day Slith may come up with an internal AI smart enough to orient overlays and objects for us, in-game... Until then, I guess we have to avoid making hassles for ourselves...Amaris wrote:Against by road construction may be more complex. Because of the orientation of the road, turns, and road crossing.
The Sea Bees could set up open fortifications and sand bags for lunch... So sure, totally they should be able to place/remove tank traps... That's a great idea!!Amaris wrote:We can even imagine engineers creating fortifications, like sandbag, open bunker or why not bunker! But also tank trap (or remove it.)
If you implement this, I'd like to steal it (sorry, borrow it ) for our GJS'44 campaign please?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
Terraform forest with trees:
It can work with all types of terrain.
Note that only the trees were removed (oil drums remained.)
Don't note the ugly warning I don't know where it's coming because it works
It can work with all types of terrain.
Note that only the trees were removed (oil drums remained.)
Don't note the ugly warning I don't know where it's coming because it works
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
Remove tank trap:
I did that quickly. It will add a loss of AP, ...
I did that quickly. It will add a loss of AP, ...
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Wow, very cool. I like both functions... Cut forest and remove tank trap!
The dynamite icon makes sense too, because you're destroying stuff.
Thinking about our Carpiquet map, could you add remove hedgerow in front of me?
That would solve a dilemma that the Allies have right now...
Final request... Could you add Construct Tank Trap?
The dynamite icon makes sense too, because you're destroying stuff.
Thinking about our Carpiquet map, could you add remove hedgerow in front of me?
That would solve a dilemma that the Allies have right now...
Final request... Could you add Construct Tank Trap?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
I use a basic icon. Doing a icon is suffering for me. Time to draw an icon, I can write 1k line of code.GottaLove88s wrote:Wow, very cool. I like both functions... Cut forest and remove tank trap!
The dynamite icon makes sense too, because you're destroying stuff.
I'll try to add also bridge construction. (I'm mad )
I'll try but I think it's difficult to deal with hedgerow.GottaLove88s wrote:Thinking about our Carpiquet map, could you add remove hedgerow in front of me?
That would solve a dilemma that the Allies have right now...
Underway of course!GottaLove88s wrote:Final request... Could you add Construct Tank Trap?
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Yes, I can see that hedgerow is awkward because it's edging... So it could be assigned to the same square as the engineer, or to the opposite square... Hmmm... How to deal with that?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
Done:GottaLove88s wrote: Could you add Construct Tank Trap?
What's else?
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
I wonder if there's an icon we could use to Construct Tank Trap that's different from the icon to destroy it?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Hedgerow? Any chance of a quick fix to remove the hedgerow between the engineer and the targeted (yellow crosshairs) sector?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Btw how much AP do each of these actions consume? 8 or 16?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
Please can I have this code? Do you mind if we plug it into GJS'44?
Last edited by GottaLove88s on Fri Mar 15, 2013 5:20 pm, edited 1 time in total.
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
No way!GottaLove88s wrote:I wonder if there's an icon we could use to Construct Tank Trap that's different from the icon to destroy it?
Ok when I'll finish the scripts.
Worked on.GottaLove88s wrote:Hedgerow? Any chance of a quick fix to remove the hedgerow between the engineer and the targeted (yellow crosshairs) sector?
For now I'll try to to remove the hedge in front of the unit.
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Captain - Heavy Cruiser
- Posts: 929
- Joined: Fri Jul 23, 2010 11:08 am
- Location: France
- Contact:
Re: Adding new functionality to engineers...?
For now all AP are consumed. But we can do what we want, 4, 8, 16, ...GottaLove88s wrote:Btw how much AP do each of these actions consume? 8 or 16?
Sure! Let me just finish.GottaLove88s wrote:Please can I have this code? Do you mind if we plug it into GJS'44?
“Take care, my friend; watch your six, and do one more roll… just for me.”
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
YAY!! You make awesome icons... I'm sure you can knock up a Tank Trap icon in your sleep! (remember, I've seen your aircraft icons from NAM! )
Removing hedge immediately in front of the unit would toootally solve my problem...
Removing hedge immediately in front of the unit would toootally solve my problem...
Amaris wrote:No way!GottaLove88s wrote:I wonder if there's an icon we could use to Construct Tank Trap that's different from the icon to destroy it?
Ok when I'll finish the scripts.
Worked on.GottaLove88s wrote:Hedgerow? Any chance of a quick fix to remove the hedgerow between the engineer and the targeted (yellow crosshairs) sector?
For now I'll try to to remove the hedge in front of the unit.
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
-
- Lieutenant-General - Do 217E
- Posts: 3151
- Joined: Fri Apr 06, 2012 6:18 pm
- Location: Palau
Re: Adding new functionality to engineers...?
16 please.Amaris wrote:For now all AP are consumed. But we can do what we want, 4, 8, 16, ...GottaLove88s wrote:Btw how much AP do each of these actions consume? 8 or 16?
It's a big task so the unit performing the action should be healthy/unsuppressed to achieve it.
And it won't have time left to do anything like fight afterwards...
Engineers working on engineering tasks will need to be well covered by other troops!
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347