• 0

    posted a message on Converting Blender Models to .m3?

    Trying to find out how to save models as .m3 can be pretty frustrating. Most information is 3+ years outdated, many plugins not updated in years and no longer working with current versions. I've tried plugins for both Blender and 3dsmax, though all 3ds max plugins seem to presume you can use the 2011 version which I have not found available for download.

    Eventually I found https://github.com/flo/m3addon which is said to work with Blender. I installed it fine, but all of my attempts to export blender models as .m3 have failed, each model for a different reason but the same result: it never even creates the .m3.

    Some examples:

    --

    Foundation\Blender\2.78\scripts\addons\m3addon-master\m3export.py", line 654, in initMesh raise Exception("The mesh %s uses '%s' as material, but no m3 material with that name exist!" % (mesh.name, mesh.m3_material_name)) Exception: The mesh Plane.002 uses '' as material, but no m3 material with that name exist!

    --

    Foundation\Blender\2.78\scripts\addons\m3addon-master\m3export.py", line 627, in initMesh raise Exception("The mesh %s has has a color layer called %s. Only color layers with the names 'color' and 'alpha' can be exported" % (meshObjectToCheck.name, vertexColorLayerName)) Exception: The mesh Player_BOX has has a color layer called Col. Only color layers with the names 'color' and 'alpha' can be exported

    --

    , line 654, in initMesh raise Exception("The mesh %s uses '%s' as material, but no m3 material with that name exist!" % (mesh.name, mesh.m3_material_name)) Exception: The mesh Cube.000 uses '' as material, but no m3 material with that name exist!

    --

    I've tried to solve these error messages but half the time they seem to reference cubes, bones, or planes that don't even exist, with the name changing each time I try to fix something,

    So I guess my question is: is this simply a matter of those particular blender models not being something that can be converted, or am I doing something wrong?

    If someone has been able to successfully convert blender models to .m3, here are the files I was trying to convert if it helps you figure out what I was doing wrong:

    http://www.blendswap.com/blends/view/76261

    http://www.blendswap.com/blends/view/26363

    http://opengameart.org/content/animated-priest

    Posted in: Artist Tavern
  • 0

    posted a message on [Triggers] Funky's Trigger Conventions
    Quote:

    periodic events really behave with low performance, a while loop is way more effient. the conditions for the while loop are ther ones that would have turned off your former periodic trigger and you call the loop action when turninig your former trigger on. it's not a replacement for the content of the trigger (which might contain conditions that are allowed to fail)

    So basically if I didn't want any conditions I could just use Repeat Forever instead of While and it would still be more efficient then periodic effect? The idea is just that loops in general are more efficient?

    Quote:

    Do ONE trigger with MapInit, then call actions in this trigger which must be executed on map start, add a wait and call the actions that must be called later. if you ever leave the map and come back half a year later, you wont have to check/find all triggers with mapInit event to see whats going on on mapstar

    Yea, I was just trying to figure out if this was an organization thing or it had some impact on performance or something to have more than one mapInit.

    Quote:

    the other trick is to use instead of any unit a unit variable and set it during the game. this allows dynamic event units too and doesnt require custom script.

    Oh, I thought you couldn't use variables in events for some reason. Or is that only specific kinds of events?

    Posted in: Tutorials
  • 0

    posted a message on [Triggers] Funky's Trigger Conventions

    So, I'm a very sloppy triggerer and I'm looking to cleanup triggers on some of my maps. I have some questions - I'm sure they all sound dumb, not great at triggers.

    First, is there any good tutorial for creating your own actions/functions/etc? I have no experience with these and am not exactly sure how to use them or what they are best used for.

    Quote:

    If there is no event, dont use a trigger, use an action...

    What is the reason behind this? Are triggers somehow inherently less efficient than making your own action? Or is it just better organization?

    Quote:

    In general events should be used as less as possible to maintain clear code and good performance.

    I don't get this - aren't events necessary to make your trigger run? How do you eliminate them? What are some common examples of excessive/redundant event usage?

    Quote:

    One thing i see again and again is the use of the MapInit event more than once. There should be only ONE entry point to your map.

    Why is this? The only reason I ever do it is if I need something with a wait in it to run at the start of the map (so I want other things to be not waiting on the wait) but I'm not sure why its better to have it under a time elapsed 0.001 rather than multiple MapInit. Maybe its because I don't really get what MapInit is doing, I always just think of it as the same thing as time elapsed 0.001 except without that tiny bit of delay.

    Quote:

    Avoid the use of periodic events, they cost too much performance, instead call an custom action (instead of turning your former trigger on) :

    I REALLY don't understand this one. Why do periodic events cause more lag than doing it this way? Plus I don't get how your workarounds work; the While loop will stop at one failure to meet conditions but for many periodic event triggers you want them to continue to keep going even if they do fail a condition check once.

    Quote:

    Instead of ANY X (i.e. any unit being killed) you should use dynamic Event adding with one specific unit; anyway there is another "trick": use a variable in the event, but be carefully with i.e "no unit"

    Lost me again, not sure how to do Dynamic Events (Do you mean using custom script to add events?) but also I'm not sure what you mean by the other "trick" you can use. Also, I'm presuming this is only applicable if you are using "any x" when you actually want it to be a specific unit, just one not on the map yet. Because I don't see how its any better to add hundreds of events to one trigger dynamically, especially when you said to avoid using events earlier.

    Quote:

    Take care what conditions you are using. There are several which costs alot of performance (pathing costs between 2 points, etc).

    Wondering if you could be more specific and say what other conditions cost a lot of performance besides pathing costs between 2 points?

    Thanks!

    Posted in: Tutorials
  • 0

    posted a message on Camera not working for Dialog Portrait Model

    @Rohime: Go

    Display a model on a Dialog. This is easy enough to do with Unit Models, but unit models constantly rotate and you have to make units for each model you want to show. The portrait Dialog item type is often seen as a solution to these problems. Using the trigger I show, the model appears but its really zoomed in to it's foot. This is a common issue when the camera isn't set right. I'm trying to set the camera according to tutorials and posts I've read in the past and it isn't working.

    Posted in: Triggers
  • 0

    posted a message on Camera not working for Dialog Portrait Model

    Dialog - Create a Portrait for dialog UnlockMiddle
    Variable - Set DisplayModel = (Last created dialog item)
    Dialog - Set DisplayModel size to (600, 400) for (All players)
    Dialog - Set DisplayModel Border Visible flag to False for (All players)
    Dialog - Set DisplayModel Background Visible flag to False for (All players)
    Dialog - Move DisplayModel to (0, 0) relative to Center of dialog for (All players)
    Dialog - Set DisplayModel Model  to Probe for (All players)
    Dialog - Set DisplayModel Camera  to "Star2CameraLow22" for (All players)
    

    From searching the topic I thought this was how you did it, but it doesn't work. The camera never changes. Everything else works fine. I tried changing when the camera was set (just after the model was set, or just after the portrait item was created) and tried a variety of camera names.

    It works if I use unit model, but I kind of want to use portrait.

    Additionally, I can set its lighting to a preset lighting but if I modify it or create my own that lighting wont work. Any idea why?

    Thanks for any help :)

    Posted in: Triggers
  • 0

    posted a message on Make only 1 unit type auto-acquire another unit

    Thanks. I forgot they should only be auto-acquired by that unit type IF they are enemy, but I think I can still get that approach to work. Just have to have two different dummy behaviors added to the victim unit depending on which team built it, and have two different search area behaviors for each teams attacking units that have a validator checking for the right behavior on the target.

    Posted in: Data
  • 0

    posted a message on Make only 1 unit type auto-acquire another unit

    Basically there is a type of unit that I want everything to be able to attack if you A+Click it manually, but I want one unit type to automatically acquire it as a target.

    I thought I could do this by making the said unit neutral and making the units weapon auto-acquire neutral targets, but I don't seem to be able to make a weapon do that.

    I can't just filter the unit out of aquire/scan/chase for all weapons except for the one I want to auto-aquire because the weapons still attack if you directly click on the unit, and I want it to take a+clicking to attack it. The only think I know of that works this way is nuetral units: If you click on them, your unit just walks to them, but you can still attack with a+click. But I can't get a weapon to auto-aquire nuetral units.

    Thanks!

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    So I knew your idea would work in theory, but I'm already using some hacks to get the system working (and its was very tricky to get it all working to begin with) so I thought attempting to make that work without interfering with my other hacks might be more work than it was worth, considering it was a relatively unimportant problem.

    I did run into several issues trying to get it to work (buildings with a build time of 0 don't register unit construction events, and changing the footprint on the platform caused a different event searching for the platforms to decide if buildings built on the platforms are now in lava or not to fail) but eventually I got it working. Thanks for the help.

    The map is Probe Wars (been published for a while now) if you want to see what I was using this for.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    Yeah, that breaks the platforms. Oh well, if thats really how its done I guess I'm out of luck.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    @ZMilla93: Go

    Unfortunately it does still need to be possible to a-click to attack them. They're platforms over lava, so you need to be able to target them to cause enemies to fall into the lava.

    Posted in: Data
  • 0

    posted a message on (solved) Unit Follow Range

    How do you change the distance at what a unit follows another?

    Basically I'm having a problem where a unit can walk over buildings (think lowered depos) but if you click directly on the lowered depo, it will only walk just next too it, instead of on top of it. I haven't been able to figure out how to change that.

    Posted in: Data
  • 0

    posted a message on Why does this cause such a FPS drop?

    This is a simple trigger. When dialog item is pressed, selected units for player are ordered to attack move towards enemies. This causes a massive FPS drop. So thought maybe it was because they were all being ordered at once, so I added a wait instead of doing them all at once. Now what happens is my FPS is fine until every unit is ordered. Then, after every unit is ordered, my FPS drops to 5-10 (from above 100) for a few seconds, and then returns to normal.

    I'm stumped. If it was due to that many units moving at once causing lag, you'd think it'd happen as the units were being ordered, and last until they stopped being ordered or stop moving. But no. It happens AFTER every unit is ordered, and it only lasts a short amount of time. Is this some kind of built-in garbage collection from blizzard causing the issue? Any help is appreciated.

    Seek N Fight
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
            Dialog - Any Dialog Item is used by Player Any Player with event type Hotkey Pressed
        Local Variables
            Unit = No Unit <Unit>
            Unit Group = (Empty unit group) <Unit Group>
            Player = 0 <Integer>
            LessLag? = (Empty unit group) <Unit Group[4]>
        Conditions
        Actions
            Unit Group - Remove all units from Unit Group
            Variable - Set Player = (Triggering player)
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Used dialog item) == SeeknFight 
                Then
                    Dialog - Hide SeeknFight Button for (Player group(Player))
                    Dialog - Hide SeeknFight  for (Player group(Player))
                    General - Wait 0.1 Game Time seconds
                    Dialog - Show SeeknFight Button for (Player group(Player))
                    Dialog - Show SeeknFight  for (Player group(Player))
                    Unit Group - Add all units in (Selected units for player Player) to Unit Group
                    Unit Group - For each unit Unit in Unit Group do (Actions)
                        Actions
                            Unit - Order Unit to ( Attack targeting ((Position of (Random Living unit from (Units in (Entire map) having alliance Enemy with player Player matching Excluded: Neutral, Worker, Missile, Dead, Hidden, Hallucination, Invulnerable, with at most Any Amount))) offset by (Random real between 4.0 and 13.0) towards (Random real between 0.0 and 360.0) degrees)) (Replace Existing Orders)
                            General - Wait 0.0001 Game Time seconds
                    General - Wait 0.05 Game Time seconds
                Else
    
    Posted in: Triggers
  • 0

    posted a message on Minimap Bounds Color

    @FunkyUserName: Go

    Ahh.. I had looked there for color values, and there was none tied to that. But I just found a border thickness value that when set to 0 makes it disappear.

    Posted in: UI Development
  • 0

    posted a message on Minimap Bounds Color

    Anyone know how to change the color of (or remove) this blue line on the minimap: http://imgur.com/eeyt7HD ?

    I think it's map or camera bounds, but I'm not certain. I tried going to "Game UI Data" in the data editor and changing minimap border color values but none of them seem to be that.

    Any help appreciated. Thanks

    Posted in: UI Development
  • 0

    posted a message on Removing Minimap Buttons

    Thanks, Funky. That left the Ping button, but I could fix that easily enough myself. Temhawk was helping me understand things a bit more in the IRC too.

    Posted in: UI Development
  • To post a comment, please or register a new account.