System Environment and Object Manipulation

PiCkstix

New Member
Reaction score
18
I have begun somehow randomly making a system where you can manipulate the environment (mainly speaking of the terrain itself).

It is still in production and I would like to develop it into a somewhat useful tool for others in maps which involve things such as terrain and object placement.

The use of the system will follow like this:
-(command) x_point,y_point,alternative value

The x_point and y_points are the coordinates on the map. These values must be written out as four digits for example, if you want x=1, you will do 0001 instead of just 1. This will fit in the min and max of the coordinates. These values can also include negative values, which will just need a "-" before it.

The alternative value differs in each case. If you are doing the terrain height, the alternative value will be the height, whereby you must also use four digits (xxxx) in order for it to respond effectively. If it were tile placement, the alternative value would be the tile. eg. Tile 1 = 0001.

Current complete commands:
-height xxxx,xxxx,xxxx
-terrain xxxx,xxxx,xxxx

I will make more for things such as object placement and doodad placement, which will include custom units and doodads as well.

I will give a VERY brief example of the two commands:

Setting Variables
Code:
Set
    Events
        Map initialization
    Conditions
    Actions
        Visibility - Disable fog of war
        Visibility - Disable black mask
        Set object_IDs[1] = Peasant
        Set object_IDs[2] = Footman
        Set object_IDs[3] = Knight
        Set object_IDs[4] = Rifleman
        -------- ---- --------
        Set tileset_IDs[1] = Lordaeron Summer - Dirt
        Set tileset_IDs[2] = Lordaeron Summer - Rough Dirt
        Set tileset_IDs[3] = Lordaeron Summer - Grassy Dirt
        Set tileset_IDs[4] = Lordaeron Summer - Rock

-height
Code:
Terrain Height
    Events
        Player - Player 1 (Red) types a chat message containing -height as A substring
    Conditions
        (Length of (Entered chat string)) Greater than 7
        (Substring((Entered chat string), 1, 7)) Equal to -height
    Actions
        Set point_height = (Point((Real((Substring((Entered chat string), 9, 12)))), (Real((Substring((Entered chat string), 14, 17))))))
        Set height = (Integer((Substring((Entered chat string), 19, 22))))
        Environment - Create a 0.01 second Permanent crater deformation at point_height with radius 95.00 and depth (-1.00 x (Real(height)))
        Camera - Pan camera for Player 1 (Red) to point_height over 0.00 seconds

To restore height deformations to 0, use -terrain [x],[y], -[original height]

-terrain (only includes the first two terrain types)
Code:
Terrain Tile
    Events
        Player - Player 1 (Red) types a chat message containing -terrain as A substring
    Conditions
        (Length of (Entered chat string)) Greater than 8
        (Substring((Entered chat string), 1, 8)) Equal to -terrain
    Actions
        Set point_terrain = (Point((Real((Substring((Entered chat string), 10, 13)))), (Real((Substring((Entered chat string), 15, 18))))))
        Set tileset = (Integer((Substring((Entered chat string), 20, 23))))
        Camera - Pan camera for Player 1 (Red) to point_terrain over 0.00 seconds
        Environment - Change terrain type at point_terrain to tileset_IDs[tileset] using variation -1 in an area of size 1 and shape Square

-object
Use of -create: eg. -create x(4 digits), y(4 digits), [object ID]

Create Object:
Code:
Object Creating
    Events
        Player - Player 1 (Red) types a chat message containing -object as A substring
    Conditions
        (Length of (Entered chat string)) Greater than 7
        (Substring((Entered chat string), 1, 7)) Equal to -object
    Actions
        Set point_object = (Point((Real((Substring((Entered chat string), 9, 12)))), (Real((Substring((Entered chat string), 14, 17))))))
        Set object_ID = (Integer((Substring((Entered chat string), 19, 22))))
        Unit - Create 1 object_IDs[object_ID] for Player 1 (Red) at point_object facing Default building facing degrees
        Camera - Pan camera for Player 1 (Red) to point_object over 0.00 seconds

So far, I have just one problem, which involves the following:

When I make a terrain which is a height of a positive value eg. 1250, if I want to change it to level (0000) or even very low (eg. 0010), it does not work, the highest terrain shows up. However, if I make the terrain height negative eg. -600, and I change it to positive, it does work. Any solutions to this?

I will finish off the system as soon as possible and it will be my first priority.

Screenshots:

-height
20a5c3q.jpg

-terrain
nybpc0.jpg

-object
of0dfs.jpg

Please also post saying whether you think it looks or sounds useful, looks or sounds if it could be alright or if it is totally useless and unneeded. (Please be honest and mature about this and refrain from statements such as "lol this pwns :D" or "omfg you sux dood this is sooo laym!!!")

Thank YOU!

Changes:
• Terrain Tiles stored in variables
• Unit-types stored in variables

NOTE: Attached map is outdated!!!
 

Attachments

  • Environment and Object Manipulator.w3x
    14.2 KB · Views: 182

PiCkstix

New Member
Reaction score
18
Ok, I am still busy with it. I will probably finish it today (it is 2:30pm here).

Please give more critiques and ideas for this. Thanks.

EDIT: Added -object
 

Flare

Stops copies me!
Reaction score
662
So... this just changes terrain type or height at a specified point? Seems cool, but the way it is now, it's impossible to use effectively (who is going to type the commands for a large number of different points on the map?)

Any solutions to this?

Probably not, since you are creating a permanent terrain deformation (have you tested this in multiplayer? I think terrain deforming can cause desyncs).

Also, your trigger conditions aren't great (i could type this and it would work)
-hithere 0001,0001,0001 -terrain
In that message, I have the corect string length, and I said -terrain so the system will register it :p

Your condition only checks the length of the string. You should change it to
Code:
Substring (Entered chat string, 1, 8) = -terrain
 

PiCkstix

New Member
Reaction score
18
Ok, thanks for that. I have attached a basic version of it so that you can take a look at it. Please edit the variables where necessary in order to add custom units etc.

I will replace the map once I have edited those bugs.

EDIT: Oh, and this is just the way of creating deformations for this map, if it is implemented, it could be used with abilities used followed by typing in coordinates, or selecting a point with an ability.
 

Trollvottel

never aging title
Reaction score
262
what happens if the x/y value is negative? it wont work. and i dont see much use in such a "system"
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Rofl I did -height 0000,0000,10000 and it kind broke the system.
It made a massive negative crater.
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
Rofl I did -height 0000,0000,10000 and it kind broke the system.
It made a massive negative crater.

That's not the system's fault, it's a game engine limitation. If you go over the maximum height allowed it creates a negative crater. You can also achieve that using WE with the height limitation disabled.
 

PiCkstix

New Member
Reaction score
18
Ok, well some negative and some positive comments. Thanks for those. I might add some more things to the system in time to come. I first must learn for exams though... ;/
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top