Jump to content


Photo

Of Passengerbones & HordeTransportContain...


Best Answer vengefulnoob, 09 April 2016 - 12:38 PM

Thanks Rider, did want to post an update about this:

 

To let people know: I have found a solution, and it's not any of the ones I was considering in the above.

 

 

As you can see above, I've managed to attach more than 10 people to passengerbones on the mumak, and it's actually very easy to do:

 

The Russian Doll Approach.

 

As stated above, HordeTransportContain allows a maximum of 10 (9 if you don't want the tenth guy floating x+40 above your model) people to be attached at any one time to a model that moves, unlike HordeGarrisonContain, which is unlimited, but causes passengers to stay in the passengerbone's original location when they boarded.

 

The solution is to use a HordeTransportContain within a HordeTransportContain. (Insert obvious Yo Dawg joke here.)

 

How I worked out it was possible.

 

Having played Generals, I knew that in SAGE games it is technically possible to put infantry inside a transport which can then travel by another transport, though I'd never seen this done in BFME, BFME2 or RotWK, so I wanted to check.

 

To see if it was possible to put one transport inside another, I started from scratch with a vanilla mumak, then I changed the initial payload to a corsair transport ship (also making sure to add SHIP and GARRISON to the mumak's passengerfilter so that it would appear). The coding holds up, and while it looks damn weird, you can have a transport ship on top of a mumakil, inside the howdah.

Next, I commented out UNSELECTABLE from the Mumak's statusof for passengers, and found that now I could select the (rather large) ship while it was being carried in the howdah, but more importantly, I could put passengers inside the ship, while it was still inside the mumak's howdah. This made me excited, so I fired up gmax to see what I could do.

 

Making the smaller doll

 

In order to get this approach to work, you will need to make a new unit and a model to fit it; for short, I'll call them dolls. In my case, I:

1. Imported the mumak

2. looked for the 2 bones I wanted the smaller dolls to be attached to

3. Moved the mumak so that one of the two bones I was going to use was dead centre in gmax's xyz coordinates

4. Deleted everything except the howdah (For reference)

5. started adding passenger bones where I wanted, making sure to use no more than 9.

6. deleted the howdah, checked off all the bones as bones in w3d tools

7. added in a hobbit pipe weed bag to show whether the model was ingame or not

8. Exported as hierarchical model with no selected skl 

 

With the modelling portion out of the way, I put the model in my asset.dat, and then made a new unit named houdaside to be the smaller doll ingame. I used RJ's haradrim tower, since it also used TransportHordeContain. I then set the houdaside to use the appropriate model, and fiddled around with it to optimize it as much as possible (making sure it wouldn't interfere with locomoters, choosing appropriate KINDOFs etc. 

 

I then adapted the mumakil.ini to allow the houdaside into the TransportHordeContain by changing passengerfilters, and added 2 of the houdasides as InitialPayloads to the mumakil. 

 

What I ended up with is 2 dolls which contained passengers, routed to the spot on the mumakil's passengerbones, and it works perfectly; the dolls follow the passengerbones perfectly, which means that so do their passengers.

 

For the future:

 

Using dolls, I have no doubt it's possible to use several layers of dolls in order to achieve a technically unlimited number of passengerbones, but for this I only needed the original mumak and the new dolls, since I was aiming for a maximum of 30 passengers, but even with only two layers of dolls, 9 x 9 is 81, and that's a LOT of potential passengers.

 

There are some limitations to the dolls, however.

 

1. The doll wants to orient itself to any unit it attacks. If you don't include a horde rangefinder on the mumakil and make the doll unselectable, the passengers will shoot from their original positions, rather than being turned around the doll over the side of the mumak to fire at a target.

 

2. The biggest issue I'm facing right now with any future progress is as follows: The dolls do not allow people to get on them. They only allow initialpayload passengers to appear on the appropriate bones; For some reason, trying to put passengers into an empty doll will result in the passengers disappearing and never getting attached to the bones.

 

Future experiments should focus on trying to see how to eliminate these two problems. Some Ideas I've had include making the dolls the STRUCTURE Kindof rather than units, but I'm not sure whether that will allow them to be carried. Unfortunately, I have finals so I can't really experiment with this right now, but I think it might just work.

 

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 vengefulnoob

vengefulnoob
  • Project Team
  • 22 posts

Posted 31 March 2016 - 09:56 AM

Hi all, since my last post, I've been working on getting more people onto the mumakil, but keep running into the same issue I've seen time and again. I worked on this all of yesterday and I've run out of ideas, so I figured it was time to shine the Bat-Signal.

 

The problem:

 

There is a limit to the number of passengerbones that can be displayed by HordeTransportContain and HordeSiegeEngineContain. Once 11 models have been attached to the passengerbones, all the remainder default to bone 11.

 

I am not the first person to encounter this.

 

The numbering system I've been using thus far has been either CARGO001 to CARGO011, or ARROW01 to ARROW11. Adding in variants, such as CARGO00, CARGO10, CARGO0001 etc. have not worked; they break the series at the point at which they are introduced. The numbering must go 01-11 in order to work properly.

 

 

What I have Tried: (other behaviours)

 

I have tried using every other Contain behaviour listed in the game.dat (Thanks to Ridder and others for exploring these!) to try and ammend the problem, and I've made a list of roughly what each do with regards to moving with a model:

 

  • HordeTransportContain: Max 11 passengers, more default to bone 11, Bone 10 is bugged by going too high (for some reason)
  • HordeSiegeContain: Max 11 passengers, more default to bone 11, Bone 10 is as normal, and you can add crew... problem is that this is a very finicky behaviour, if you forget ANYTHING in the behaviour it gives you game.dat crashes, and even then contradictions in the .ini will often enough crash your game when you spawn the unit.
 
  • GarrisonHordeContain: The solution! Or so I thought. You can stick as many people on passengerbones as you want! All you have to do is adjust the height of the bones!

Haradrim on mumakil.jpg

 

"Look at that amazing Howdah! 32 Haradrim, it's almost exactly like the films! Put it on the mumakil, Vengeful!"

 

Oh...

 

See, being an idiot, I failed to realise that GarrisonHordeContain literally sticks all of your passengers in place. The mumakil will move, with howdah attached, but none of the passengers move with it, they just stay standing in midair where they boarded the howdah in the first place. 

 

Well, bugger.

 

The others that I tried:

  • OpenContain, TunnelContain, CaveContain, HealContain: Don't attach anyone to the passengerbones
  • AODHordeContain, HordeContain (a long shot, I know, but wanted to be sure), HorseHordeContain: Don't allow the mumakil to spawn to begin with.
  • SlaughterHordeContain (Another long shot, but I had to know): Great fun, if you want to remove your troops in the middle of a battle. Not so good for mounting an enraged pachyderm.
  • SiegeEngineContain: Ok, so this one was funny. The troops enter the mumak. By standing underneath it, and running with it as it moves. 

 

Obviously, none of these really work. So, I started looking for alternative solutions:

 

The other approach:

 

Ok, so if the other contain behaviours don't work, what about HordeTransportContain: What can we do about that?

 

The answer is: quite a bit. Problem is, working out *how* to use it.

 

Attaching a Horde itself to a bone turns out to be impossible: the passengers simply do not appear on the assigned passengerbones.

 

HordeTransportContain requires you to label prefixes for the passengerbones you want to attach passengers to. What this means is that you can have passengerbones labelled other things. The mumakil already has a good example, the B_BANNER bone will put your banner carrier (or Hero, if you're using RJ, as I am) on the top platform, away from everyone else, and what's more, it circumvents the 11 passenger max! (So far, the most I've managed is 13 passengers displayed, with passenger 11 being all remaining passengers, and passengers 12 and 13 being a BANNER and HERO respectively on a BANNER and MAHUD bone.

 

"Great, so just label the bones something else, add them to the hordetransportcontain and be done with it"

 

Unfortunately, it's not that easy: Once all of one KINDOF unit are placed on one prefix of passengerbone, that's it. There's no way to add additional passengers of the same KINDOF onto CARGO if you've already used ARROW, for example. This means that you can only put one infantry horde on the mumak, since the remainder simply do not get attached and effectively disappear. (I guess they're enclosed? Not sure where they disappear to since they don't attach to any bones and aren't underneath the mumak either)

 

So, now to the potential solution. If there's any way to give a passenger a unique KINDOF upon it entering a container in such a way that different hordes can be assigned to different prefixed bones (For example, giving the first horde to enter a "First horde" KINDOF, the second a "Second Horde" KINDOF etc.) then it *might* be possible to go over the 11 bone limit; Otherwise, this looks like a hard limit we are stuck with courtesy of the game.dat.

 

Thanks for reading, and hope for a couple of suggestions!


Edited by vengefulnoob, 31 March 2016 - 10:02 AM.

EoPZnYh.png

#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 07 April 2016 - 05:36 PM

If I'm not mistaken you approached me on skype about this?

Did you manage to find something that works, or does this remain unsolved?

(Might be interesting to others who run into this problem)


Ridder Geel

#3 vengefulnoob

vengefulnoob
  • Project Team
  • 22 posts

Posted 09 April 2016 - 12:38 PM   Best Answer

Thanks Rider, did want to post an update about this:

 

To let people know: I have found a solution, and it's not any of the ones I was considering in the above.

 

sshot0006.jpg

 

As you can see above, I've managed to attach more than 10 people to passengerbones on the mumak, and it's actually very easy to do:

 

The Russian Doll Approach.

 

As stated above, HordeTransportContain allows a maximum of 10 (9 if you don't want the tenth guy floating x+40 above your model) people to be attached at any one time to a model that moves, unlike HordeGarrisonContain, which is unlimited, but causes passengers to stay in the passengerbone's original location when they boarded.

 

The solution is to use a HordeTransportContain within a HordeTransportContain. (Insert obvious Yo Dawg joke here.)

 

How I worked out it was possible.

 

Having played Generals, I knew that in SAGE games it is technically possible to put infantry inside a transport which can then travel by another transport, though I'd never seen this done in BFME, BFME2 or RotWK, so I wanted to check.

 

To see if it was possible to put one transport inside another, I started from scratch with a vanilla mumak, then I changed the initial payload to a corsair transport ship (also making sure to add SHIP and GARRISON to the mumak's passengerfilter so that it would appear). The coding holds up, and while it looks damn weird, you can have a transport ship on top of a mumakil, inside the howdah.

Next, I commented out UNSELECTABLE from the Mumak's statusof for passengers, and found that now I could select the (rather large) ship while it was being carried in the howdah, but more importantly, I could put passengers inside the ship, while it was still inside the mumak's howdah. This made me excited, so I fired up gmax to see what I could do.

 

Making the smaller doll

 

In order to get this approach to work, you will need to make a new unit and a model to fit it; for short, I'll call them dolls. In my case, I:

1. Imported the mumak

2. looked for the 2 bones I wanted the smaller dolls to be attached to

3. Moved the mumak so that one of the two bones I was going to use was dead centre in gmax's xyz coordinates

4. Deleted everything except the howdah (For reference)

5. started adding passenger bones where I wanted, making sure to use no more than 9.

6. deleted the howdah, checked off all the bones as bones in w3d tools

7. added in a hobbit pipe weed bag to show whether the model was ingame or not

8. Exported as hierarchical model with no selected skl 

 

With the modelling portion out of the way, I put the model in my asset.dat, and then made a new unit named houdaside to be the smaller doll ingame. I used RJ's haradrim tower, since it also used TransportHordeContain. I then set the houdaside to use the appropriate model, and fiddled around with it to optimize it as much as possible (making sure it wouldn't interfere with locomoters, choosing appropriate KINDOFs etc. Attached File  houdaside.ini   3.92KB   186 downloads

 

I then adapted the mumakil.ini to allow the houdaside into the TransportHordeContain by changing passengerfilters, and added 2 of the houdasides as InitialPayloads to the mumakil. Attached File  mumakil.ini   81.73KB   165 downloads

 

What I ended up with is 2 dolls which contained passengers, routed to the spot on the mumakil's passengerbones, and it works perfectly; the dolls follow the passengerbones perfectly, which means that so do their passengers.

 

For the future:

 

Using dolls, I have no doubt it's possible to use several layers of dolls in order to achieve a technically unlimited number of passengerbones, but for this I only needed the original mumak and the new dolls, since I was aiming for a maximum of 30 passengers, but even with only two layers of dolls, 9 x 9 is 81, and that's a LOT of potential passengers.

 

There are some limitations to the dolls, however.

 

1. The doll wants to orient itself to any unit it attacks. If you don't include a horde rangefinder on the mumakil and make the doll unselectable, the passengers will shoot from their original positions, rather than being turned around the doll over the side of the mumak to fire at a target.

 

2. The biggest issue I'm facing right now with any future progress is as follows: The dolls do not allow people to get on them. They only allow initialpayload passengers to appear on the appropriate bones; For some reason, trying to put passengers into an empty doll will result in the passengers disappearing and never getting attached to the bones.

 

Future experiments should focus on trying to see how to eliminate these two problems. Some Ideas I've had include making the dolls the STRUCTURE Kindof rather than units, but I'm not sure whether that will allow them to be carried. Unfortunately, I have finals so I can't really experiment with this right now, but I think it might just work.

 


EoPZnYh.png

#4 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 11 April 2016 - 08:17 PM

Interesting findings, I look forward to seeing how this all turns out :)

Nice to see you got it working fairly well :p


Ridder Geel

#5 Carthaen

Carthaen
  • Members
  • 6 posts

Posted 04 June 2017 - 07:46 PM

Is it still in process? Or has it already done? All my friend and me could do: all orcs/haradrim was under mumakil in one heap. How make this doll? What bonces have to use? 



#6 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 07 June 2017 - 12:30 AM

That's some intense coding and problem troubleshooting.
I went the easy route with this and dropped the horde size of the haradrim .
I still like the idea of mounting and unmountimg a Mumakil when needed




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users