Jump to content


Photo

Geometry Problems while unpacking


  • Please log in to reply
5 replies to this topic

#1 lotrfan

lotrfan

    title available

  • Project Team
  • 318 posts

Posted 20 November 2010 - 08:18 AM

Hi,

I'm making a mod that converts rotwk into bfme1.

So far it is mostly successful, and have already tested it in private multiplayer matches.


A big problem that exists in bfme2/rotwk is that there are geometry issues when you unpack a base. Unless you have a small geometry or something, the object being unpacked will not show up if there are units or other objects obstructing the way.

Posts regarding this issue have been scattered around the forum and I wanted to start a new thread here to see how we can 'automatically' solve the unpacking issue. I look forward to ideas being posted so that we all can resolve this issue.


The following is a list of ways currently known to resolve the issue. There are advantages and disadvantages to each method.

1. Make geometries small (set all the geometries of the building you want to unpack to 1.0 or something). I do something like this in my mod, but for some reason dwarves in particular sometimes have a problem unpacking (for the economyplots). Maybe it is because their model is physically bigger than the other farms. Also, whenever unpacking anything and you have units there, those objects to be unpacked (such as a gate if you are in the gateway) disappear. The advantage of this method is that it allows for a 'drag and drop' of bfme1 style maps into bfme2/rotwk. I got it working for the most part, but sometimes you get a random glitch I mentioned above with the dwarves or gate or something. I want to however get rid of the issue completely if possible

2. Unpacking via scripts. This is what is done in all the other mods that convert bfme2 into bfme1. This does not require you change geometry and allows unpacking of bases without any problem. The disadvantage of this is that currently (as done in current mods), you have to manually add the scripts to every map you want to unpack. Also you have to wait a few seconds at the start of the map for the unpack to happen. A third potential problem is that, as I understand it, current mods that implement this method only unpack via scripts at the start of the match. Later in the match, when you unpack, it is done using the traditional unpacking.



What I want to do is to do is
1. find out how/why the unpack via script makes it work correctly and
2. Try to get it to unpack the same way (or better) in the mod code somewhere (as opposed to in every map) so that it does so automatically.


Any help in these areas is greatly appreciated.
Posted Image

#2 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 20 November 2010 - 11:51 AM

I've never run into problems unpacking a base later in a game. Then again, I only played with this concept for a short while, it's very possible I just never encountered the problem, doesn't mean it doesn't exist.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#3 DeeZire

DeeZire
  • Members
  • 140 posts

Posted 20 November 2010 - 01:49 PM

I've never dabbled with this but my guess is because BFMEII/RotWK are missing this code;-
GameData

  BlockedByWallLeeway = 50

  SecondsBeforeBaseCheckActive = 3

  ClampedLOSHeightForCastleStructures = 100

End

Edited by DeeZire, 20 November 2010 - 01:50 PM.


#4 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 20 November 2010 - 01:55 PM

If that solves the problem so many people are going to simultaneously facepalm.

                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#5 lotrfan

lotrfan

    title available

  • Project Team
  • 318 posts

Posted 22 November 2010 - 07:17 AM

Tried it.

Doesn't seem to get rid of the problem.
Posted Image

#6 JUS_SAURON

JUS_SAURON

    El Shaddai

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

Posted 28 November 2010 - 12:25 AM

2. Try to get it to unpack the same way (or better) in the mod code somewhere (as opposed to in every map) so that it does so automatically.


I tried many approches to this problem ..
As you rightly posted its a 100% geometry problem with the
objects in the GondorBuildings.ini

The only viable solution that is 100% coding is using the delay geometry method
( which is not even my Idea ) saw it posted in the forum ..


CODE
Object GondorCastleGateL

;;;; All the oher codes ABOVE

Behavior = GrantUpgradeCreate MakeTheGeom1
UpgradeToGrant = Upgrade_DamrodRallyRangers
End

Behavior = ObjectCreationUpgrade MakeTheGeom2
TriggeredBy = Upgrade_DamrodRallyRangers
Delay = 10
GrantUpgrade = Upgrade_SwitchToRockThrowing
End

Behavior = GeometryUpgrade ModueTag_TowerGeom
TriggeredBy = Upgrade_SwitchToRockThrowing
ShowGeometry = Geom_Orig1 Geom_Orig2 ; Geom_Orig3 Bookend1 Bookend2 ; For more names !
HideGeometry = DummyGeom

End

Geometry = BOX
GeometryMajorRadius = 1.0
GeometryMinorRadius = 1.0
GeometryHeight = 1.0
GeometryName = DummyGeom
GeometryActive = Yes


Geometry = BOX
GeometryMajorRadius = 24.0
GeometryMinorRadius = 55.0
GeometryHeight = 52.0
GeometryOffset = X:-3 Y:55 Z:0
GeometryName = Geom_Orig1
GeometryActive = No

AdditionalGeometry = CYLINDER
GeometryMajorRadius = 33.0
GeometryMinorRadius = 0
GeometryHeight = 52.0
GeometryOffset = X:-12 Y:105 Z:0
GeometryName = Geom_Orig2
GeometryActive = No
GeometryRotationAnchorOffset = X:375.0 Y:0
GeometryIsSmall = No


GeometryContactPoint = X:35 Y: 25 Z:0 Grab
GeometryContactPoint = X:21 Y: 25 Z:0
GeometryContactPoint = X:21 Y: 60 Z:52
GeometryContactPoint = X:21 Y: 95 Z:0
GeometryContactPoint = X:31 Y: 95 Z:0 Grab
GeometryContactPoint = X:-50 Y: 95 Z:0 Grab
GeometryContactPoint = X:-30 Y: 95 Z:0
GeometryContactPoint = X:-21 Y: 60 Z:52
GeometryContactPoint = X:-21 Y: 25 Z:0
GeometryContactPoint = X:-40 Y: 25 Z:0 Grab

Shadow = SHADOW_VOLUME
End


The original geometry starts Hidden and is Active after the base unpacks correctly
The Delay time can be 1 and it still works
I have tested it and it works ..

I only had to painstaking re-create each NE / NW / SE / SW castle BASES files exactly
don't know why but this plus the new geometry codes will give a proper unpack

The build priority of the 'problem pieces ' had to be set to 90 I think in phase 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users