• 0

    posted a message on changing sound volumes

    I'm trying to put sounds into one of my projects but I can't figure out how to change the volume.

    In the data editor each sound has a volume field (0dB by default) which I have experimented with setting volumes to 6dB or -99dB with no difference (+6 and -99 are the limits allowed. If you don't know what dB is, it is a log scale of how strong the sound is. 0dB = 100%, 6dB is cranking the sound up super loud and -99dB should be so quiet that it can't be heard)

    Each sound entry in the sound section of the data module has a list of individual sound files with their own volume control so I have cranked them to full volume or turned them down with no effect.

    I have checked the rollof effects which make sounds louder/softer the closer/further away from them you are and tested in game by moving the camera right up to the sound source. and that is behaving as it should.

    nothing i do seems to effect the volume of the sound either way.

    I've since discovered it's easier to import sounds you want than try to find existing sounds and so I can set the volume before I import but it would still be much faster if I could make small adjustments as I go rather than have to go through the whole process again every time I want something louder/quieter.

    Thanks for your help.

    Posted in: General Chat
  • 0

    posted a message on Bezier curves

    Description

    The following script contains functions for calculating and making use of Bézier curves, which provide a convenient means for modeling smooth curves. These curves can be used to make smooth, non-linear gradients and transitions, for use in simple physics systems or just to make visual interface elements look prettier.

    One example might be to create a realistic flight path for a ship in 3D, creating a natural looking trail in 2D, drawing smooth curves on dialogs, generating realistic random movement for units etc.

    The first and last two points define the endpoints and the other control points are used to pule the line in different directions. So for instance using the control points (0,0,4), (0, 4, 3), (4, 4, 2), (4, 0, 1), (0, 0, 0) would create a downward, clockwise spiral which might be suitable for a plane with a damaged wing to fall out of the sky.

    download/installation

    The code for bezier curves is contained in this file: bezier demonstration

    When the map is loaded it automatically generates bezier curves to demonstrate. The control points are marked by pineapples and the curve is marked out using apples. The camera then rotates around showing you the curve in 3D.

    To use in your project just copy/paste the functions needed. Unless you are creating a map called "FRUIT IN SPACE" you will have to change the values to suit your needs. Once you have the control points you want pass the array to the bezier points function along with a value of how far along the curve you want the point for. 0 is equal to the starting point and 1 equals the end. These pictures are created using values evenly spaced between 0 and 1.

    Here is a picture of a bezier curve using 5 randomized control points (the fourth is very close to the start so the pineapples overlap slightly) bezier curve

    It can be seen how the control points pull the curve towards themselves.

    If the control points are random and restricted to a region then too many points just creates a jumble, but with slight modification here is an example of 14 points:

    bezier curve 14 controls

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on General strings library

    Description

    Over time and multiple projects I have found myself importing and extending the same functions which I find myself needing again and again.

    Here are a bunch of string functions which I find I cannot do without and are sorely missing from the SC2 functions library:

    Contents

    including but not limited to:

    string manipulation
    • trim whitespace from start/end
    • split strings using delimiter
    • extract first section from string (using delimiter)
    • remove first section from string (using delimiter)
    • string equality
    • string comparisson (alphabetically)
    • vowel/constenents
    Debugging
    • debugging function (with switches to turn on/off, pause between outputs, output to file)
    • assert - usefull debugging technique to ensure values are reasonable and alert when things go wrong
    • various "x to string" conversions which make debugging using the gui easier for example: debug_s(str_unit_pairs("looking at the unit", u, str_point_pairs("at location", p, str_real_pairs("with energy", e, ""))) prints the othput "looking at unit = marine, at location = (120, 45), with energy = 31." This is a quick way to chan strings together using the gui for quicker debugging.
    catalog reading/manipulation
    • reading catalog entries/fields

    downloading and instalation

    I have uploaded the file on SC2Mapster here: strings library

    Just open the file in the map editor, select the whole lot and copy/paste into your own project for access.

    Some of the functions are in GUI some in galaxy (unfortunately I could not figure out how to access galaxy at first. Otherwise they would ALL be in galaxy) but if you are still using the GUI you can access the galaxy scripts by using the "custom code" action and calling the function that way (remembering that the editor appends variables with "lv_")

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on General maths library

    Description

    Over time and multiple projects I have found myself importing and extending the same functions which I find myself needing again and again.

    Here are a bunch of maths functions which I find I cannot do without and are sorely missing from the SC2 functions library:

    Contents

    Including but not limited to:

    Basic geometry / vector arithmatic:
    • vector addition/subtraction
    • vector multiplication/division by scalars
    • magnitude
    • normalization
    • perpendicular vectors
    • cross product / dot product
    • calculations of angles between vectors
    • regular polygon points (triangles, squars, pentagons, hexagons, heptagons, octagons.... etc)
    groups:
    • ordering groups by distance (ascending/descending)
    • finding/removing outliers
    • finding smallesr circle which encloses unit group
    • determine linearity
    • random sampling
    map checking:
    • closest pathable point
    • find cliffs on map
    misc:
    • change of base (translation, scale, rotation)
    • natural logarithm
    • Qsort template (cleaner and better than the one in the default SC2 sorting library)
    • determine which side of screen unit is on

    downloading and instalation

    I have uploaded the file on SC2Mapster here: Maths library

    Just open the file in the map editor, select the whole lot and copy/paste into your own project for access.

    Some of the functions are in GUI some in galaxy (unfortunately I could not figure out how to access galaxy at first. Otherwise they would ALL be in galaxy) but if you are still using the GUI you can access the galaxy scripts by using the "custom code" action and calling the function that way (remembering that the editor appends variables with "lv_")

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Can't fix Skybox error

    I only just encountered this problem but googling shows that people have had this problem since 6 years ago. I was wondering if in 6 years time anyone found a solution to this bug. If it hasn't been patched in all this time I don't hold any hope of it being patched in the near future.

    Posted in: Terrain
  • 0

    posted a message on Can't fix Skybox error

    So.....

    6 years on and I have a giant black border messing up my map that I can't get rid of. safe to assume that this is unfixable?

    Posted in: Terrain
  • 0

    posted a message on New Sub-Forum just visible for bots

    The general chat is the forum which gets the vast majority of spam. but I figured the bots just look at which forum is the most active and post there. In which case putting another sub forum first would not do anything.

    However SC2mapster gets far more spam than legitimate posts. So maybe if you renamed the "general chat" to "spam trap" and then created a new forum for general discussion the renamed "spam trap" forum would still be the most active and so would draw all the spam posts.

    ... unless they go off the number of views... in which case you would need to either fake the view count or create a view bot of our own...

    but these methods are just bandaids on bullet holes. it's not going to fix the core problem of requiring some form of verification.

    Posted in: General Chat
  • 0

    posted a message on I am having some extension mod problems...

    What Masked imposter says.

    in your mods map initialization blank the players screens (enter cinematic mode?) so they don't see what is happening. put a "wait 3 seconds" line in and it will wait and load the maps init trigger. remove victory/defeat conditions. remove starting units. create whatever starting units you want the playerss to have. end cinematic mode so that the players screen is unblanked.

    Posted in: Triggers
  • 0

    posted a message on Detect Replay playback

    I used to do something simillar to what Funkyusername is saying. use the player settings in the editor to create a designated "observer" player which is set to computer only. give this player full map vission and display relevent dialog stuff to that player.

    In the replay viewer you can set the camera to be that players vesion and you get to see the dialogs.

    As a side note: I wish there was a way to step through the code on a replay or use the actions in one replay on a modified version of the map for the purpose of debugging. That way if a player sends you a replay where a bug happens you can use the replay to reproduce the bug and find out what the cause is. But alas I don't think there is a way to do that. For a while I used the above method but it cannot work with extension mods and created a messy lobby which would sometimes confuse people. and some people arereally dumb.

    Posted in: Triggers
  • 0

    posted a message on I am having some extension mod problems...

    @Supernova134: Go

    AFAIK you cannot overwrite the maps triggers.

    If the problem is that it creates the starting units twice (once in the extension mod triggers and once in the maps triggers) then why can't you just remove the "create starting units" line from the extension mod? Then it is doing it only once.

    Posted in: Triggers
  • 0

    posted a message on Blizz: First paid content in arcade, no time line. Blizz will work with specific content creators at first

    Can we keep the idealogies at home and keep the discussion to the arcade? There are valid concerns to have and there are reasonable countermeasures to keep things in check. I'm glad Blizzard is approaching it with caution and on a smaller scale and going from there. Sounds like a good way to approach it.

    Saying the sky is falling is not constructive. Bringing up concerns and discussing implementations which remove/minimize those concerns is constructive.

    concern:

    it opens players to being ripped off

    discussion:

    A good system must have transparency about what they are getting for their dollar. Some examples might be a try before you buy approach to all paid games or a grace period where they can chose to get their money back. Also the garuntee that they will always be able to access the version they paid for. How do we do that?

    concern:

    none of the maps will be worth paying money for

    discussion:

    why is that a concern of yours if the people paying money are aware of what they are recieving? Is that our judgement call to make? Also, how can we know what the quality of product will be in a market that does not yet exist?

    concern:

    People will not share their content with other creators making it harder for new people

    discussion:

    Does that environment actually exist currently? Many maps are currently locked already, does that prevent people from learning what they need to know? Personally I think looking through other peoples work is one of the worst ways you can learn about what you want to do. Especially given the range of people here willing to directly offer answers to those with questions. Other situations with paid content still have those same resources available so why would that change?

    concern:

    currently existing content will be removed

    discussion:

    Can paid content realistically come with restrictions such as for new content ONLY and not for existing content? Maybe by ensuring that the pre-existing content remains in place alongside any new paid versions. If Blizzard owns all the conetnt and they plan to be "hands on" then surely they can make whatever descisions they chose to be in the best interest of the players.

    if paid arcade becomes open to everyone with no Blizzard oversight then it becomes more tricky to prevent abuse through any fully automated system, however it is worth discussing possible solutions. And in the end Blizzard will always be able to shutdown anyone they think is abusing the system. Is any of this feasable?

    concern:

    modding should be done for enjoyment and not for money.

    discussion:

    How is this development changing the way you approach your hobby?

    Probably there is a lot I've said you disagree with. Probably there is some stuff in there that even I disagree with but am playing devils advocate for. ALL of what I said would require further refinement and debate. But can we discuss the point of disagreement and isolate where the disagreement is coming from and find ways to reconcile those points.

    Regurgitating the same tired old talking points again and again gets us nowhere. We sound like a bunch of politicians in a live debate repeating the same 5 second soundbites to score points with our core constituents because it's easier than discussing the actual issues.

    Let's talk like people, not like politicians.

    Posted in: General Chat
  • 0

    posted a message on Water System

    @SapeurGoblin: Go

    Did you mean like creep? have the water zones have invisible creep on the ground and give the ships zero off-creep movement speed? That should be possible. Although the pathing wouldn't handle that. For example if there is an island in the way the boat would not go around the island it would probably go in a straight line and then get stuck when it hits the land.

    What about using cliffs? sure, you wouldn't be able to have land units and boats in the same terrain but you could still have ports and let units board boats just by being close to eachother.

    You could combine both methods and use cliffs for the shores and have rivers/inlets where you have ramps so that boats can travel on them AND ground units could travel on them. Boats would not be able to leave the water due to zero off-creep movement and you don't have to worry about pathing because it will not go into these areas unless told to do so explicitely. But then you have to have a way to prevent the ground units from entering the deep water.

    Posted in: Miscellaneous Development
  • 0

    posted a message on An introduction of myself

    Holds up spork...

    Hello.

    Quote:

    I am remaking the entirety of the SC2 campaigns

    Why on earth would you do that?

    Posted in: General Chat
  • 0

    posted a message on Automatic split

    That's great! I didn't know the exact function names or syntax off the top of my head but I'm glad you were able to follow it and implement your own.

    If you can, upload a clip to youtube. I love watching that kind of stuff where units make a descission individually and yet it results in group organization.

    EDIT: you said it works, but i realized a small mistake i made. instead of "others = g" i meant to put others = copyofunitgroup(g). theres some function which makes a copy of a group whereas i think "=" just passes a reference to the same group

    Posted in: Triggers
  • 0

    posted a message on Automatic split

    There is no trigger to make units split but it is not very hard to create one.

    The easiest way would be to add all the units to a unit group and do something like this:

    void autosplit(unitgroup g) {
    
        fixed countdown;
        fixed delay;
    
        countdown = 10;
        delay = 0.5;
    
        while(countdown > 0) {
            diverge(g);
            wait(delay);
            countdown -= delay;
        }
    
    }
    
    void diverge(unitgroup g) {
    
        unit u;
        unitgroup others;
        point p;
        point avoid;
        point destination;
        int i;
        
        for(i = 1; i < sizeofunitgroup(g); i += 1) {
            u = UnitGroupUnit(g, i);
            others = g;
            removeunitfromunitgroup(others, u);
            p = positionofunit(u);
            avoid = positionofunit(closestunittoposition(others, p));
            if(distancebetweenpoints(p, avoid) < 2) {
                destination = pointoffsetbypoint(p,-2,avoid);
                issueunitorder(u,move,destination);
            }
        }
    
    }
    

    That code would run for 10 seconds and make all the units run away from eachother for ten seconds to a maximum distance of 2. So they would spread out without scattering.

    There are better ways you could do it but that's probably the easiest

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