Thread: Map Editor

Page 4 of 13 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 124
  1. #31  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    208
    Thanks given
    119
    Thanks received
    294
    Rep Power
    358
    I guess this has been more of a project thread..

    Model Viewer
    It looks pretty simple but I made it trickier than I should've.. I modified the client to optionally load and open/close custom interfaces (and client scripts) stored externally of the cache. Which was mostly unnecessary but I learned a lot while doing this so.. s'all good.
    Now I need to have the client close the rest of the interfaces loaded on screen other than the settings tab and minimap.

    Attached image


    Object Locator
    Much simpler than the above, but a nice tool to have. I designed it specifically to locate invisible objects such as minimap icons. It lists out every spawn location of the object id entered with the ability to teleport directly (and select) to whichever is selected.
    Oh and of course the right-click options are a useful addition.
    Attached image

    I'm also going to write in an object definitions scrollpane, listing out every object which will tie to the model viewer. Should make finding objects to use much easier. I should really probably start focusing more on cleaning rather than utility tho..
    Reply With Quote  
     

  2. #32  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Looks good, is the object editting ui in-game interfaces or bolted on swing/fx panels?
    Attached imageAttached image
    Reply With Quote  
     

  3. #33  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    208
    Thanks given
    119
    Thanks received
    294
    Rep Power
    358
    Quote Originally Posted by Greg View Post
    Look good, is the object editting ui in-game interfaces or bolted on swing/fx panels?
    Thank you! And the only in-game interface is the model viewer, everything else is bolt on
    Reply With Quote  
     

  4. #34  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    208
    Thanks given
    119
    Thanks received
    294
    Rep Power
    358
    This is probably the last update I'll be doing for this. I'm pretty burnt out with it again haha.

    With object editing pretty much done I moved over to the height map side of things. It was pretty slow applying new values for the same reason as object editing, having to manually adjust each field for each tile. The shifters help and the copy/paste tool is great for direct duplicates, but often times you only really need to adjust one or a few properties, so the newest addition is the paint tool (probably a better name for it but w/e). Allows pasting a variety of properties in any mix/match dependent on checkbox selection, if left unchecked then that property will remain as is on the selected tile..

    When I do get back to it, my focus will definitely be cleaning/optimizing/fixing (there are a lot of bugs, some of which are client crashers if not careful) and I'd like to tackle the world map side of things eventually.
    But as it stands, it's in a pretty effective state to make some maps at a decent pace, so for now I'll probably just play with the editor itself

    Overlay checked
    Attached image
    Height and overlay checked
    Attached image
    Brush sizes (most useful for flattening and underlays)
    Attached image

    Oh and that smooth tile button basically just smoothes verts. A utility that adjusts height to smooth out sharp edges on hills etc.
    Reply With Quote  
     

  5. #35  
    ⚔️ Battle614 - Superiority ⚔️

    Battle614's Avatar
    Join Date
    Aug 2020
    Posts
    243
    Thanks given
    72
    Thanks received
    472
    Rep Power
    803
    Amazing work man !
    Reply With Quote  
     

  6. Thankful user:


  7. #36  
    Celestial - Founder
    Classic's Avatar
    Join Date
    Nov 2014
    Posts
    233
    Thanks given
    119
    Thanks received
    47
    Rep Power
    39
    awesome skills man. good to see some good work
    Reply With Quote  
     

  8. Thankful user:


  9. #37  
    Registered Member
    Join Date
    Jun 2020
    Posts
    13
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Nice map editor man! Looks great!
    Quick question, how did you get it to show those 3d images of the objects before they are spawned?
    Reply With Quote  
     

  10. #38  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    208
    Thanks given
    119
    Thanks received
    294
    Rep Power
    358
    Quote Originally Posted by masante View Post
    Nice map editor man! Looks great!
    Quick question, how did you get it to show those 3d images of the objects before they are spawned?
    Hmm, it was a long time ago- I figured that one out when playing around with CS2 scripts and interfaces, but if I recall there is a method within the ObjectDefinitions class on the client side that prepares the model for display when spawned. Objects are often made up of multiple models.

    There is a definition tied to the component type "Model" that dictates what kind of model is being displayed (regular model, npc, player, item) it is the variable that is set to 1 when a model type widget is created which translates to just a regular model. This variable is changed via clientscripts, for example, 5 is what it's set to when you're displaying your full player (such as in equipment view).

    So based on this variable, there is a class (I can't remember which) that will prepare and display a model accordingly. It's just a block of if statements, like if (modelType == 5) then display full player model. I created an additional condition that will instead display a full object if the modelType == 10 (because 10 was unused), using that prepare model method from the ObjectDefinitions.

    Then, I had to add a clientscript opcode that would set the modelType to 10, because this variable is defaulted to 1 when the component is created and can't be set directly through creating the interface. Which meant I also had to create a custom CS2 script that would execute that opcode as-well as assign an object id.

    That might be vague and not very hepful but I can not remember exactly what I did. I dipped my hands in so many different areas of the client these past few months haha.
    Reply With Quote  
     

  11. #39  
    Registered Member
    Join Date
    Jun 2020
    Posts
    13
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by Stugger View Post
    Hmm, it was a long time ago- I figured that one out when playing around with CS2 scripts and interfaces, but if I recall there is a method within the ObjectDefinitions class on the client side that prepares the model for display when spawned. Objects are often made up of multiple models.

    There is a definition tied to the component type "Model" that dictates what kind of model is being displayed (regular model, npc, player, item) it is the variable that is set to 1 when a model type widget is created which translates to just a regular model. This variable is changed via clientscripts, for example, 5 is what it's set to when you're displaying your full player (such as in equipment view).

    So based on this variable, there is a class (I can't remember which) that will prepare and display a model accordingly. It's just a block of if statements, like if (modelType == 5) then display full player model. I created an additional condition that will instead display a full object if the modelType == 10 (because 10 was unused), using that prepare model method from the ObjectDefinitions.

    Then, I had to add a clientscript opcode that would set the modelType to 10, because this variable is defaulted to 1 when the component is created and can't be set directly through creating the interface. Which meant I also had to create a custom CS2 script that would execute that opcode as-well as assign an object id.

    That might be vague and not very hepful but I can not remember exactly what I did. I dipped my hands in so many different areas of the client these past few months haha.
    Oh interesting, so it was the ObjectDefinitions class in the client side of things? Yeah so I tried to find what you were talking about and it looks like there are just a crap ton of methods without any logical naming schemes, so I guess I'm probably just gonna have to mess around with the different functions to see what each one does.
    Really interesting that everything was done from the client side of things, just because everything is just named so badly. Must have taken a long time to do that then!
    Reply With Quote  
     

  12. #40  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    208
    Thanks given
    119
    Thanks received
    294
    Rep Power
    358
    Quote Originally Posted by masante View Post
    Oh interesting, so it was the ObjectDefinitions class in the client side of things? Yeah so I tried to find what you were talking about and it looks like there are just a crap ton of methods without any logical naming schemes, so I guess I'm probably just gonna have to mess around with the different functions to see what each one does.
    Really interesting that everything was done from the client side of things, just because everything is just named so badly. Must have taken a long time to do that then!
    Yeah for my map editor, it's 100% client sided so I don't need a CS2 script which is all that is required to use it on a server. But yeah man the client is a big ol' heap of bullshit- a lot of methods, parameters and variables are unused or have the sole-purpose of just throwing you off. My method of attack is simply just changing values and seeing what happens lol. It's taken me a lot of time to get to where I am now in the client but I figured this one out while just reverse-engineering client scripts so it wasn't something I was aiming to do, thus I don't really recall exactly how I got there or how I did it other than mentioned in the previous post. I can do some digging into it though if it's something you're really interested in having? I can help you out on discord or whatever, just send me a pm. (however if you're not running a 667 I don't know how much help I can be).

    ---

    While I'm here might as well put up an update. I finally figured out how to get a mouse hover tile overlay that sticks to vertices heights, which is super helpful for obvious reasons..
    Attached image
    Attached image
    Reply With Quote  
     

Page 4 of 13 FirstFirst ... 23456 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 6
    Last Post: 11-14-2016, 09:09 PM
  2. Adding NPC Spawns in 667 [THE RIGHT WAY]
    By Cloud クラウド in forum Tutorials
    Replies: 6
    Last Post: 03-13-2012, 08:03 PM
  3. Replies: 10
    Last Post: 06-22-2009, 07:17 PM
  4. Adding Menu's the Right way!
    By Amirtje12 in forum Tutorials
    Replies: 3
    Last Post: 03-11-2008, 07:54 PM
  5. Working Stair's *The Right Way*(Got Bored)
    By щ з خ خ ұ in forum Tutorials
    Replies: 2
    Last Post: 12-04-2007, 11:14 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •