Map Decal Painter

Release your plugins here!
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Map Decal Painter

Postby Doldol » Fri Jul 11, 2014 8:19 pm

I'm sharing a plugin I coded for personal use, it's meant to paint decals/materials on a map.

It's mainly handy to customize a map a bit to your own clan/community without actually editing the map.
There is an example included which paints some standard CSS decals @ CT spawn on de_dust2, but it fully supports and makes your own materials downloadable, which is it's intended use.

I would greatly appreciate feedback!

Github:
https://github.com/Doldol/DecalPainter

Direct Download (Latest):
https://github.com/Doldol/DecalPainter/ ... master.zip
Last edited by Doldol on Thu May 02, 2019 8:34 pm, edited 1 time in total.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sat Jul 12, 2014 3:38 am

Nice addon!

A few pointers. All C++ exposed modules will eventually be private and forwarded to another package/module. Currently, all of them are, with the exception of constants and tools. That being said, you should not directly import them. GlobalVars is available in the "core" package:

Syntax: Select all

from core import GlobalVars


Also, you might want to look into using the site-package path. You should also look at our paths module. All of the objects from the paths module are "path" instances. This is one way that will help you:

Syntax: Select all

from path import Path

# Get the path to the plugin's directory
base_path = Path(__file__).parent

MODNAME = base_path.namebase
DECALPATH = base_path.joinpath('decallist.json')
COORDSDIR = base_path.joinpath('coords')


def _get_coords_file(self):
map_coords = self.coordsdir.joinpath('{0}{1}.json'.format(self.map_name, self.map_version))
if map_coords.isfile():
return map_coords.open()
map_coords = self.coordsdir.joinpath('{0}.json'.format(self.map_name))
if map_coords.isfile():
return map_coords.open()
return None


One more thing. If a server updates your plugin and does not restart, the old value of your plugin's "version" variable will still show the old version number. Instead you should use something like:

Syntax: Select all

info.cvar = ConVar("{0}_version".format(info.basename), info.version, FCVAR_NOTIFY, info.name)
info.cvar.set_string(info.version)
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Postby Doldol » Sat Jul 12, 2014 3:08 pm

I dug trough repo to try and find the best import locations, but I must have missed the one for GlobalVars, thanks for that and the other tips, didn't know about them!

I updated the download.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Wed Apr 17, 2019 9:33 am

Hey, I tested it, but it does not load the decals.

Here is my decallist.json

Code: Select all

{
"Example Skull":{
   "vtf":"hud/leaderboard_dead.vtf",
   "vmt":"hud/leaderboard_dead.vmt"
   },
"Example Numbers":{
   "vtf":"sprites/numbers.vtf",
   "vmt":"sprites/numbers.vmt"
   },
"RocKs":{
   "vtf":"decals/custom/suicide.vtf",
   "vmt":"decals/custom/suicide.vmt",
   "vtf":"decals/custom/alien.vtf",
   "vmt":"decals/custom/alien.vmt",
   "vtf":"decals/custom/alien1.vtf",
   "vmt":"decals/custom/alien1.vmt",
   "vtf":"decals/custom/baum.vtf",
   "vmt":"decals/custom/baum.vmt",
   "vtf":"decals/custom/car.vtf",
   "vmt":"decals/custom/car.vmt",
   "vtf":"decals/custom/dark.vtf",
   "vmt":"decals/custom/dark.vmt",
   "vtf":"decals/custom/dead1.vtf",
   "vmt":"decals/custom/dead1.vmt",
   "vtf":"decals/custom/dead2.vtf",
   "vmt":"decals/custom/dead2.vmt",
   "vtf":"decals/custom/game.vtf",
   "vmt":"decals/custom/game.vmt",
   "vtf":"decals/custom/dirty.vtf",
   "vmt":"decals/custom/dirty.vmt",
   "vtf":"decals/custom/healthpack.vtf",
   "vmt":"decals/custom/healthpack.vmt",
   "vtf":"decals/custom/mercy.vtf",
   "vmt":"decals/custom/mercy.vmt",
   "vtf":"decals/custom/nhfa.vtf",
   "vmt":"decals/custom/nhfa.vmt",
   "vtf":"decals/custom/norge.vtf",
   "vmt":"decals/custom/norge.vmt",
   "vtf":"decals/custom/rlod.vtf",
   "vmt":"decals/custom/rlod.vmt",
   "vtf":"decals/custom/taste.vtf",
   "vmt":"decals/custom/taste.vmt",
   "vtf":"decals/custom/wwyd.vtf",
   "vmt":"decals/custom/wwyd.vmt",
   "vtf":"decals/custom/yad.vtf",
   "vmt":"decals/custom/yad.vmt",
   "vtf":"decals/custom/yagtd.vtf",   
   "vmt":"decals/custom/yagtd.vmt",
   "vtf":"decals/custom/splat1.vtf",
   "vmt":"decals/custom/splat1.vmt",
   "vtf":"decals/custom/splat2.vtf",
   "vmt":"decals/custom/splat2.vmt",
   "vtf":"decals/custom/splat3.vtf",
   "vmt":"decals/custom/splat3.vmt",
   "vtf":"decals/custom/splat4.vtf",
   "vmt":"decals/custom/splat4.vmt",
   "vtf":"decals/custom/splat5.vtf",   
   "vmt":"decals/custom/splat5.vmt",
   "vtf":"decals/custom/crane.vtf",
   "vmt":"decals/custom/crane.vmt",
   "vtf":"decals/custom/death.vtf",   
   "vmt":"decals/custom/death.vmt",
   "vtf":"decals/custom/fear.vtf",
   "vmt":"decals/custom/fear.vmt",
   "vtf":"decals/custom/penta.vtf",
   "vmt":"decals/custom/penta.vmt",
   "vtf":"decals/custom/splitt.vtf",
   "vmt":"decals/custom/splitt.vmt",
   "vtf":"decals/custom/us.vtf",
   "vmt":"decals/custom/us.vmt",
   "vtf":"decals/custom/zombie.vtf",
   "vmt":"decals/custom/zombie.vmt",
   "vtf":"decals/custom/blatt.vtf",
   "vmt":"decals/custom/blatt.vmt",
   "vtf":"decals/custom/blut1.vtf",
   "vmt":"decals/custom/blut1.vmt",
   "vtf":"decals/custom/blut3.vtf",
   "vmt":"decals/custom/blut3.vmt",
   "vtf":"decals/custom/blut4.vtf",   
   "vmt":"decals/custom/blut4.vmt",
   "vtf":"decals/custom/blut5.vtf",
   "vmt":"decals/custom/blut5.vmt",
   "vtf":"decals/custom/blut6.vtf",
   "vmt":"decals/custom/blut6.vmt",
   "vtf":"decals/custom/blut7.vtf",
   "vmt":"decals/custom/blut7.vmt",
   "vtf":"decals/custom/blut8.vtf",
   "vmt":"decals/custom/blut8.vmt",
   "vtf":"decals/custom/blut9.vtf",   
   "vmt":"decals/custom/blut9.vmt",
   "vtf":"decals/custom/blut10.vtf",
   "vmt":"decals/custom/blut10.vmt",
   "vtf":"decals/custom/blut11.vtf",   
   "vmt":"decals/custom/blut11.vmt",
   "vtf":"decals/custom/gas.vtf",
   "vmt":"decals/custom/gas.vmt",
   "vtf":"decals/custom/gestruep.vtf",
   "vmt":"decals/custom/gestruep.vmt",
   "vtf":"decals/custom/gestruep1.vtf",
   "vmt":"decals/custom/gestruep1.vmt",
   "vtf":"decals/custom/gestruep2.vtf",
   "vmt":"decals/custom/gestruep2.vmt",
   "vtf":"decals/custom/gtrabbi.vtf",
   "vmt":"decals/custom/gtrabbi.vmt",
   "vtf":"decals/custom/moos.vtf",
   "vmt":"decals/custom/moos.vmt",
   "vtf":"decals/custom/moos1.vtf",
   "vmt":"decals/custom/moos1.vmt",
   "vtf":"decals/custom/rocks.vtf",
   "vmt":"decals/custom/rocks.vmt",
   "vtf":"decals/custom/rocks1.vtf",
   "vmt":"decals/custom/rocks1.vmt",
   "vtf":"decals/custom/rocks2.vtf",
   "vmt":"decals/custom/rocks2.vmt",
   "vtf":"decals/custom/stein.vtf",   
   "vmt":"decals/custom/stein.vmt",
   "vtf":"decals/custom/stein1.vtf",
   "vmt":"decals/custom/stein1.vmt",
   "vtf":"decals/custom/stroh.vtf",
   "vmt":"decals/custom/stroh.vmt",
   "vtf":"decals/custom/wand.vtf",
   "vmt":"decals/custom/wand.vmt",
   "vtf":"decals/custom/wand1.vtf",
   "vmt":"decals/custom/wand1.vmt",
   "vtf":"decals/custom/wand2.vtf",
   "vmt":"decals/custom/wand2.vmt",
   "vtf":"decals/custom/wand3.vtf",
   "vmt":"decals/custom/wand3.vmt",
   "vtf":"decals/custom/wand4.vtf",
   "vmt":"decals/custom/wand4.vmt",
   "vtf":"decals/custom/wand5.vtf",
   "vmt":"decals/custom/wand5.vmt",
   "vtf":"decals/custom/wand6.vtf",
   "vmt":"decals/custom/wand6.vmt",
   "vtf":"decals/custom/wand7.vtf",
   "vmt":"decals/custom/wand7.vmt",
   "vtf":"decals/custom/wand8.vtf",
   "vmt":"decals/custom/wand8.vmt",
   "vtf":"decals/custom/wand9.vtf",
   "vmt":"decals/custom/wand9.vmt",
   "vtf":"decals/custom/wand10.vtf",   
   "vmt":"decals/custom/wand10.vmt",
   "vtf":"decals/custom/wand11.vtf",
   "vmt":"decals/custom/wand11.vmt",
   "vtf":"decals/custom/wand12.vtf",
   "vmt":"decals/custom/wand12.vmt",
   "vtf":"decals/custom/wand13.vtf",
   "vmt":"decals/custom/wand13.vmt",
   "vtf":"decals/custom/zebrastreifen.vtf",
   "vmt":"decals/custom/zebrastreifen.vmt",
   "vtf":"decals/custom/zebrastreifen1.vtf",
   "vmt":"decals/custom/zebrastreifen1.vmt"   
     }
}


and my map config (I took these from sourcemod decals)

adv_torus_ver1.json

Code: Select all

{
"RocKs":[
   [1310.124512 -946.622742 -853.294739],
   [-77.790283 957.883423 -873.664307],
   [1285.415649 963.992920 -872.617859],
   [-64.246124 -954.771484 -876.698730]
   ]
}
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Sun Apr 21, 2019 2:24 pm

I think this is the problem.

Can anybody help?

Code: Select all

Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
    plugin = self.manager.load(plugin_name)
  File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
    plugin._load()
  File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
    self.module = import_module(self.import_name)
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 5, in <module>
    from tools import ServerTools

ModuleNotFoundError: No module named 'tools'
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Mon Apr 29, 2019 1:36 pm

nobody can help ?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Map Decal Painter

Postby satoon101 » Tue Apr 30, 2019 12:50 am

This plugin was written a long time ago and uses functionality that has been moved/removed/renamed. Doldol was last on the site a couple weeks ago, so let's give him some more time to see this and determine if he wants to fix it. If not, I might look at it this weekend.
Image
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Thu May 02, 2019 1:57 pm

We give him time. :cool:
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Re: Map Decal Painter

Postby Doldol » Thu May 02, 2019 8:09 pm

I'm really busy right now outside of this project, I can try to look into it sometime when I'm free (earliest this weekend) but if someone wants to fix it up by all means go for it. :)

Edit: I just remembered I definitely have a more up-to-date version somewhere though, I'll search for it.
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Re: Map Decal Painter

Postby Doldol » Thu May 02, 2019 8:37 pm

Okay I made a repo for it, since it's probably easier & updated it to the latest version I had.

I suspect the github version should work now, but make me aware if there are any issues.

Also pain, you're supposed to provide 1 vmt and 1 vtf per entry, not multiple pairs.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Fri May 03, 2019 3:36 pm

I tried their new version but nothing changed.
It loads without any problems but it does not work it also does not load any files

Did you mean with several multiple pairs?

example better?

Code: Select all

{
"Example Skull":{
   "vtf":"hud/leaderboard_dead.vtf",
   "vmt":"hud/leaderboard_dead.vmt"
   },
"Example Numbers":{
   "vtf":"sprites/numbers.vtf",
   "vmt":"sprites/numbers.vmt"
   },
"suicide":{
   "vtf":"decals/custom/suicide.vtf",
   "vmt":"decals/custom/suicide.vmt",
   },
"alien":{
   "vtf":"decals/custom/alien.vtf",
   "vmt":"decals/custom/alien.vmt",
   {
"alien1":{
   "vtf":"decals/custom/alien1.vtf",
   "vmt":"decals/custom/alien1.vmt"
   },
"baum":{
   "vtf":"decals/custom/baum.vtf",
   "vmt":"decals/custom/baum.vmt"
     }
}


I still have a question, my coordinates look like this from older plugin.

Code: Select all

"Positions"
{
   "suicide"
   {
      "pos1"      "-528.822815 -959.968750 -415.264404"
      "pos2"      "-447.458313 553.347229 -479.968750"
      "pos3"      "-552.185059 691.968750 -578.597351"
      "pos4"      "549.610107 959.968750 -581.933594"
   }
   "redknife"
   {
      "pos1"      "724.031250 -353.806366 -434.170715"
      "pos2"      "420.306274 -724.031250 -415.808472"
      "pos3"      "-518.409790 418.031250 -589.366760"
   }
   "nhfa"
   {
      "pos1"      "-959.968750 -873.662354 -420.562012"
      "pos2"      "-959.968750 492.502563 -418.859467"
      "pos3"      "959.968750 -152.279114 -412.865784"
      "pos4"      "188.656540 -724.031250 -415.365845"
      "pos5"      "-223.227951 -413.968750 -412.442261"
      "pos6"      "246.031784 -123.968750 -418.467194"
      "pos7"      "155.893509 418.031250 -584.726013"
      "pos8"      "-239.168884 418.031250 -588.203369"
   }
   "rlod"
   {
      "pos1"      "-724.031250 -511.854767 -416.953491"
      "pos2"      "724.031250 273.275726 -420.004700"
      "pos3"      "-274.805054 -229.031250 -409.778412"
      "pos4"      "-959.968750 540.099976 -579.820862"
      "pos5"      "334.600159 418.031250 -585.261780"
      "pos6"      "-364.335907 418.031250 -589.542603"
      "pos7"      "-176.304611 691.968750 -581.900269"
   }
   "norge"
   {
      "pos1"      "-724.031250 -258.681213 -416.072937"
      "pos2"      "-350.632507 959.968750 -416.413330"
      "pos3"      "959.968750 285.666046 -419.225952"
      "pos4"      "291.546417 724.031250 -582.459045"
   }
   "taste"
   {
      "pos1"      "-628.472229 123.968758 -413.030640"
      "pos2"      "724.031250 587.049255 -415.968719"
      "pos3"      "-92.176773 418.031250 -584.675720"
   }
   "wwyd"
   {
      "pos1"      "319.265747 724.031250 -418.467163"
      "pos2"      "-457.986908 123.968750 -417.330750"
      "pos3"      "959.968750 -502.154816 -422.191437"
      "pos4"      "991.968750 830.898254 -588.161804"
      "pos5"      "599.026428 418.031250 -574.569092"
      "pos6"      "-288.654144 -724.031250 -430.254028"
   }
   "yagtd"
   {
      "pos1"      "-959.968750 -150.376709 -417.631989"
      "pos2"      "582.987671 724.031250 -416.955688"
      "pos3"      "-139.428864 -959.968750 -417.646729"
      "pos4"      "-375.968750 -325.254120 -418.669525"
      "pos5"      "123.968750 -213.957397 -415.065033"
      "pos6"      "339.304626 691.968750 -585.378967"
      "pos7"      "-367.968750 -564.618408 -420.042328"
      "pos8"      "-367.968750 -457.574158 -421.840576"
   }
   "yad"
   {
      "pos1"      "-959.968750 161.449265 -419.480713"
      "pos2"      "612.771912 691.968750 -585.716736"
   }
   "mercy"
   {
      "pos1"      "1027.906738 -967.968750 -440.655304"
      "pos2"      "399.457458 959.968750 -376.098083"
      "pos3"      "-230.002411 724.031250 -449.096558"
      "pos4"      "-600.956116 724.031250 -449.643402"
      "pos5"      "355.275757 -746.667542 -479.968750"
      "pos6"      "959.968750 -829.342590 -360.087341"
   }
   "healthpack"
   {
      "pos1"      "1196.997192 -967.968750 -429.600006"
      "pos2"      "-724.031250 -399.458252 -418.702393"
      "pos3"      "724.031250 419.039612 -421.723846"
   }
   "dirty"
   {
      "pos1"      "226.968750 1126.355225 -461.975861"
   }
   "splat1"
   {
      "pos1"      "101.031258 1103.058960 -439.107239"
      "pos2"      "215.853897 869.528564 -479.968750"
      "pos3"      "-53.119469 -569.099243 -479.968750"
      "pos4"      "-253.400177 -322.786560 -479.968750"
      "pos5"      "1093.213135 -842.250488 -479.968750"
      "pos6"      "1247.968750 -805.582336 -397.806702"
      "pos7"      "1160.550049 -885.149475 -352.031250"
      "pos8"      "1036.830566 -704.031250 -415.180786"
      "pos9"      "1182.511841 -781.285461 -352.031250"
      "pos10"      "1069.590332 -881.416443 -352.031250"
      "pos11"      "1074.965332 -761.026123 -479.968750"
   }
   "splat2"
   {
      "pos1"      "1177.701782 -704.031250 -413.191650"
      "pos2"      "1193.110352 -869.681519 -479.968750"
   }
   "splat3"
   {
      "pos1"      "1041.681641 -967.968750 -389.704590"
   }
   "splat5"
   {
      "pos1"      "994.031250 -765.105347 -434.196655"
   }
   "splat4"
   {
      "pos1"      "-123.968750 -619.765625 -412.614471"
   }
   "zombie"
   {
      "pos1"      "386.942322 -959.968750 -408.343567"
      "pos2"      "-123.968750 -195.229095 -413.103363"
      "pos3"      "123.968750 656.152527 -412.790314"
      "pos4"      "354.968750 1108.958374 -563.826294"
      "pos5"      "175.111984 1304.968750 -536.434998"
      "pos6"      "587.169006 959.968750 -412.825775"
      "pos7"      "991.968750 560.430786 -583.479187"
   }
   "blut1"
   {
      "pos1"      "26.138952 779.541504 -479.968750"
   }
   "blut4"
   {
      "pos1"      "-88.210007 880.780273 -479.968750"
      "pos2"      "-43.768211 680.989014 -479.968750"
   }
   "splitt"
   {
      "pos1"      "160.524841 994.031250 -285.861908"
   }
   "crane"
   {
      "pos1"      "354.968750 1245.173950 -280.512665"
   }
   "death"
   {
      "pos1"      "-493.123108 838.203125 -643.968750"
      "pos2"      "676.419250 784.210632 -643.968750"
   }
   "rocks"
   {
      "pos1"      "428.486115 123.968750 -405.701782"
   }
}


Is there a way to adapt your plugin?

If not I will have to spray again.

My old plugin had sprayed over 70 maps
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Re: Map Decal Painter

Postby Doldol » Mon May 06, 2019 5:20 pm

Painkiller wrote:example better?

Yes, that seems correct.


Painkiller wrote:Is there a way to adapt your plugin?

Say this was your old file:

Code: Select all

"Positions"
{
   "suicide"
   {
      "pos1"      "-528.822815 -959.968750 -415.264404"
      "pos2"      "-447.458313 553.347229 -479.968750"
      "pos3"      "-552.185059 691.968750 -578.597351"
      "pos4"      "549.610107 959.968750 -581.933594"
   }
}


Equivalent for this plugin:

Code: Select all

{
   "suicide":[
      [-528.822815, -959.968750, -415.264404],
      [-447.458313, 553.347229, -479.968750],
      [-552.185059, 691.968750, -578.597351],
      [549.610107, 959.968750, -581.933594]
   ]
}
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Wed May 08, 2019 3:04 pm

Ok, I have adjusted everything and now get this error.


Code: Select all

7:03:18 [SP] Unloading plugin 'decalpainter'...
         [SP] Unable to unload plugin 'decalpainter' as it is not currently loaded.
         [SP] Loading plugin 'decalpainter'...
         
         [SP] Caught an Exception:
         Traceback (most recent call last):
           File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
             plugin = self.manager.load(plugin_name)
           File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
             plugin._load()
           File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
             self.module = import_module(self.import_name)
           File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 111, in <module>
             decalmanager = DecalManager(DECALPATH, COORDSDIR)
           File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 52, in __init__
             self.refresh()
           File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 60, in refresh
             self._compile_coords()
           File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 84, in _compile_coords
             coords = json.load(f)
           File "../addons/source-python/Python3/json/__init__.py", line 299, in load
             parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
           File "../addons/source-python/Python3/json/__init__.py", line 354, in loads
             return _default_decoder.decode(s)
           File "../addons/source-python/Python3/json/decoder.py", line 339, in decode
             obj, end = self.raw_decode(s, idx=_w(s, 0).end())
           File "../addons/source-python/Python3/json/decoder.py", line 355, in raw_decode
             obj, end = self.scan_once(s, idx)
         
         json.decoder.JSONDecodeError: Expecting ',' delimiter: line 3 column 18 (char 32)
         
         
         [SP] Plugin 'decalpainter' was unable to be loaded.


Code: Select all

{
   "suicide":{
      "vtf":"decals/custom/suicide.vtf",
      "vmt":"decals/custom/suicide.vmt"
      },
   "alien":{
      "vtf":"decals/custom/alien.vtf",
      "vmt":"decals/custom/alien.vmt"
      },
   "alien1":{
      "vtf":"decals/custom/alien1.vtf",
      "vmt":"decals/custom/alien1.vmt"
      },
   "baum":{
      "vtf":"decals/custom/baum.vtf",
      "vmt":"decals/custom/baum.vmt"
        },
   "car":{
   "vtf":"decals/custom/car.vtf",
   "vmt":"decals/custom/car.vmt"
        },
   "dark":{
   "vtf":"decals/custom/dark.vtf",
   "vmt":"decals/custom/dark.vmt"
        },
   "dead1":{
   "vtf":"decals/custom/dead1.vtf",
   "vmt":"decals/custom/dead1.vmt"
        },
   "dead2":{
   "vtf":"decals/custom/dead2.vtf",
   "vmt":"decals/custom/dead2.vmt"
        },
   "game":{
   "vtf":"decals/custom/game.vtf",
   "vmt":"decals/custom/game.vmt"
        },
   "dirty":{
   "vtf":"decals/custom/dirty.vtf",
   "vmt":"decals/custom/dirty.vmt"
        },
   "healthpack":{
   "vtf":"decals/custom/healthpack.vtf",
   "vmt":"decals/custom/healthpack.vmt"
        },
   "mercy":{
   "vtf":"decals/custom/mercy.vtf",
   "vmt":"decals/custom/mercy.vmt"
        },
   "nhfa":{
   "vtf":"decals/custom/nhfa.vtf",
   "vmt":"decals/custom/nhfa.vmt"
        },
   "norge":{
   "vtf":"decals/custom/norge.vtf",
   "vmt":"decals/custom/norge.vmt"
        },
   "rlod":{
   "vtf":"decals/custom/rlod.vtf",
   "vmt":"decals/custom/rlod.vmt"
        },
   "taste":{
   "vtf":"decals/custom/taste.vtf",
   "vmt":"decals/custom/taste.vmt"
        },
   "wwyd":{
   "vtf":"decals/custom/wwyd.vtf",
   "vmt":"decals/custom/wwyd.vmt"
        },
   "yad":{
   "vtf":"decals/custom/yad.vtf",
   "vmt":"decals/custom/yad.vmt"
        },
   "yagtd":{
   "vtf":"decals/custom/yagtd.vtf",   
   "vmt":"decals/custom/yagtd.vmt"
        },
   "splat1":{
   "vtf":"decals/custom/splat1.vtf",
   "vmt":"decals/custom/splat1.vmt"
        },
   "splat2":{
   "vtf":"decals/custom/splat2.vtf",
   "vmt":"decals/custom/splat2.vmt"
        },
   "splat3":{
   "vtf":"decals/custom/splat3.vtf",
   "vmt":"decals/custom/splat3.vmt"
        },
   "splat4":{
   "vtf":"decals/custom/splat4.vtf",
   "vmt":"decals/custom/splat4.vmt"
        },
   "splat5":{
   "vtf":"decals/custom/splat5.vtf",   
   "vmt":"decals/custom/splat5.vmt"
        },
   "crane":{
   "vtf":"decals/custom/crane.vtf",
   "vmt":"decals/custom/crane.vmt"
        },
   "death":{
   "vtf":"decals/custom/death.vtf",   
   "vmt":"decals/custom/death.vmt"
        },
   "fear":{
   "vtf":"decals/custom/fear.vtf",
   "vmt":"decals/custom/fear.vmt"
        },
   "penta":{
   "vtf":"decals/custom/penta.vtf",
   "vmt":"decals/custom/penta.vmt"
        },
   "splitt":{
   "vtf":"decals/custom/splitt.vtf",
   "vmt":"decals/custom/splitt.vmt"
        },
   "us":{
   "vtf":"decals/custom/us.vtf",
   "vmt":"decals/custom/us.vmt"
        },
   "zombie":{
   "vtf":"decals/custom/zombie.vtf",
   "vmt":"decals/custom/zombie.vmt"
        },
   "blatt":{
   "vtf":"decals/custom/blatt.vtf",
   "vmt":"decals/custom/blatt.vmt"
        },
   "blut1":{
   "vtf":"decals/custom/blut1.vtf",
   "vmt":"decals/custom/blut1.vmt"
        },
   "blut3":{
   "vtf":"decals/custom/blut3.vtf",
   "vmt":"decals/custom/blut3.vmt"
        },
   "blut4":{
   "vtf":"decals/custom/blut4.vtf",   
   "vmt":"decals/custom/blut4.vmt"
        },
   "blut5":{
   "vtf":"decals/custom/blut5.vtf",
   "vmt":"decals/custom/blut5.vmt"
        },
   "blut6":{
   "vtf":"decals/custom/blut6.vtf",
   "vmt":"decals/custom/blut6.vmt"
        },
   "blut7":{
   "vtf":"decals/custom/blut7.vtf",
   "vmt":"decals/custom/blut7.vmt"
        },
   "blut8":{
   "vtf":"decals/custom/blut8.vtf",
   "vmt":"decals/custom/blut8.vmt"
        },
   "blut9":{
   "vtf":"decals/custom/blut9.vtf",   
   "vmt":"decals/custom/blut9.vmt"
        },
   "blut10":{
   "vtf":"decals/custom/blut10.vtf",
   "vmt":"decals/custom/blut10.vmt"
        },
   "blut11":{
   "vtf":"decals/custom/blut11.vtf",   
   "vmt":"decals/custom/blut11.vmt"
        },
   "gas":{
   "vtf":"decals/custom/gas.vtf",
   "vmt":"decals/custom/gas.vmt"
        },
   "gestruep":{
   "vtf":"decals/custom/gestruep.vtf",
   "vmt":"decals/custom/gestruep.vmt"
        },
   "gestruep1":{
   "vtf":"decals/custom/gestruep1.vtf",
   "vmt":"decals/custom/gestruep1.vmt"
        },
   "gestruep2":{
   "vtf":"decals/custom/gestruep2.vtf",
   "vmt":"decals/custom/gestruep2.vmt"
        },
   "gtrabbi":{
   "vtf":"decals/custom/gtrabbi.vtf",
   "vmt":"decals/custom/gtrabbi.vmt"
        },
   "moos":{
   "vtf":"decals/custom/moos.vtf",
   "vmt":"decals/custom/moos.vmt"
        },
   "moos1":{
   "vtf":"decals/custom/moos1.vtf",
   "vmt":"decals/custom/moos1.vmt"
        },
   "rocks":{
   "vtf":"decals/custom/rocks.vtf",
   "vmt":"decals/custom/rocks.vmt"
        },
   "rocks1":{
   "vtf":"decals/custom/rocks1.vtf",
   "vmt":"decals/custom/rocks1.vmt"
        },
   "rocks2":{
   "vtf":"decals/custom/rocks2.vtf",
   "vmt":"decals/custom/rocks2.vmt"
        },
   "stein":{
   "vtf":"decals/custom/stein.vtf",   
   "vmt":"decals/custom/stein.vmt"
        },
   "stein1":{
   "vtf":"decals/custom/stein1.vtf",
   "vmt":"decals/custom/stein1.vmt"
        },
   "stroh":{
   "vtf":"decals/custom/stroh.vtf",
   "vmt":"decals/custom/stroh.vmt"
        },
   "wand":{
   "vtf":"decals/custom/wand.vtf",
   "vmt":"decals/custom/wand.vmt"
        },
   "wand1":{
   "vtf":"decals/custom/wand1.vtf",
   "vmt":"decals/custom/wand1.vmt"
        },
   "wand2":{
   "vtf":"decals/custom/wand2.vtf",
   "vmt":"decals/custom/wand2.vmt"
        },
   "wand3":{
   "vtf":"decals/custom/wand3.vtf",
   "vmt":"decals/custom/wand3.vmt"
        },
   "wand4":{
   "vtf":"decals/custom/wand4.vtf",
   "vmt":"decals/custom/wand4.vmt"
        },
   "wand5":{
   "vtf":"decals/custom/wand5.vtf",
   "vmt":"decals/custom/wand5.vmt"
        },
   "wand6":{
   "vtf":"decals/custom/wand6.vtf",
   "vmt":"decals/custom/wand6.vmt"
        },
   "wand7":{
   "vtf":"decals/custom/wand7.vtf",
   "vmt":"decals/custom/wand7.vmt"
        },
   "wand8":{
   "vtf":"decals/custom/wand8.vtf",
   "vmt":"decals/custom/wand8.vmt"
        },
   "wand9":{
   "vtf":"decals/custom/wand9.vtf",
   "vmt":"decals/custom/wand9.vmt"
        },
   "wand10":{
   "vtf":"decals/custom/wand10.vtf",   
   "vmt":"decals/custom/wand10.vmt"
        },
   "wand11":{
   "vtf":"decals/custom/wand11.vtf",
   "vmt":"decals/custom/wand11.vmt"
        },
   "wand12":{
   "vtf":"decals/custom/wand12.vtf",
   "vmt":"decals/custom/wand12.vmt"
        },
   "wand13":{
   "vtf":"decals/custom/wand13.vtf",
   "vmt":"decals/custom/wand13.vmt"
        },
   "zebrastreifen":{
   "vtf":"decals/custom/zebrastreifen.vtf",
   "vmt":"decals/custom/zebrastreifen.vmt"
        },
   "zebrastreifen1":{
   "vtf":"decals/custom/zebrastreifen1.vtf",
   "vmt":"decals/custom/zebrastreifen1.vmt"   
     }
}
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Map Decal Painter

Postby satoon101 » Wed May 08, 2019 3:22 pm

The error is coming from your coords file. Did you update it in the same way that Doldol mentioned in his last post?
Image
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Wed May 08, 2019 3:26 pm

Yes i think hmm ...

Code: Select all

{
   "suicide":[
      [-528.822815 -959.968750 -415.264404]
      [-447.458313 553.347229 -479.968750]
      [-552.185059 691.968750 -578.597351]
      [549.610107 959.968750 -581.933594]
   ]
   "redknife":[
      [724.031250 -353.806366 -434.170715]
      [420.306274 -724.031250 -415.808472]
      [-518.409790 418.031250 -589.366760]
   ]
   "nhfa":[
      [-959.968750 -873.662354 -420.562012]
      [-959.968750 492.502563 -418.859467]
      [959.968750 -152.279114 -412.865784]
      [188.656540 -724.031250 -415.365845]
      [-223.227951 -413.968750 -412.442261]
      [246.031784 -123.968750 -418.467194]
      [155.893509 418.031250 -584.726013]
      [-239.168884 418.031250 -588.203369]
   ]
   "rlod":[
      [-724.031250 -511.854767 -416.953491]
      [724.031250 273.275726 -420.004700]
      [-274.805054 -229.031250 -409.778412]
      [-959.968750 540.099976 -579.820862]
      [334.600159 418.031250 -585.261780]
      [-364.335907 418.031250 -589.542603]
      [-176.304611 691.968750 -581.900269]
   ]
   "norge":[
      [-724.031250 -258.681213 -416.0729378]
      [-350.632507 959.968750 -416.413330]
      [959.968750 285.666046 -419.225952]
      [291.546417 724.031250 -582.459045]
   ]
   "taste":[
      [-628.472229 123.968758 -413.030640]
      [724.031250 587.049255 -415.968719]
      [-92.176773 418.031250 -584.675720]
   ]
   "wwyd":[
      [319.265747 724.031250 -418.467163]
      [-457.986908 123.968750 -417.330750]
      [959.968750 -502.154816 -422.191437]
      [991.968750 830.898254 -588.161804]
      [599.026428 418.031250 -574.5690929
      [-288.654144 -724.031250 -430.2540289
   ]
   "yagtd":[
      [-959.968750 -150.376709 -417.631989]
      [582.987671 724.031250 -416.955688]
      [-139.428864 -959.968750 -417.646729]
      [-375.968750 -325.254120 -418.669525]
      [123.968750 -213.957397 -415.065033]
      [339.304626 691.968750 -585.378967]
      [-367.968750 -564.618408 -420.042328]
      [-367.968750 -457.574158 -421.8405769]
   ]
   "yad":[
      [-959.968750 161.449265 -419.480713]
      [612.771912 691.968750 -585.716736]
   ]
   "mercy":[
      [1027.906738 -967.968750 -440.655304]
      [399.457458 959.968750 -376.098083]
      [-230.002411 724.031250 -449.096558]
      [-600.956116 724.031250 -449.643402]
      [355.275757 -746.667542 -479.968750]
      [959.968750 -829.342590 -360.087341]
   ]
   "healthpack":[
      [1196.997192 -967.968750 -429.600006]
      [-724.031250 -399.458252 -418.702393]
      [724.031250 419.039612 -421.723846]
   ]
   "dirty":[
      [226.968750 1126.355225 -461.975861]
   ]
   "splat1":[
   {
      [101.031258 1103.058960 -439.107239]
      [215.853897 869.528564 -479.968750]
      [-53.119469 -569.099243 -479.968750]
      [-253.400177 -322.786560 -479.968750]
      [1093.213135 -842.250488 -479.968750]
      [1247.968750 -805.582336 -397.806702]
      [1160.550049 -885.149475 -352.031250]
      [1036.830566 -704.031250 -415.180786]
      [1182.511841 -781.285461 -352.031250]
      [1069.590332 -881.416443 -352.031250]
      [1074.965332 -761.026123 -479.968750]
   ]
   "splat2":[
      [1177.701782 -704.031250 -413.191650]
      [1193.110352 -869.681519 -479.968750]
   ]
   "splat3":[
      [1041.681641 -967.968750 -389.704590]
   ]
   "splat5":[
      [994.031250 -765.105347 -434.196655]
   ]
   "splat4":[
      [-123.968750 -619.765625 -412.614471]
   ]
   "zombie":[
      [386.942322 -959.968750 -408.343567]
      [-123.968750 -195.229095 -413.103363]
      [123.968750 656.152527 -412.790314]
      [354.968750 1108.958374 -563.826294]
      [175.111984 1304.968750 -536.434998]
      [587.169006 959.968750 -412.825775]
      [991.968750 560.430786 -583.479187]
   ]
   "blut1":[
      [26.138952 779.541504 -479.968750]
   ]
   "blut4":[
      [-88.210007 880.780273 -479.968750]
      [-43.768211 680.989014 -479.968750]
   ]
   "splitt":[
      [160.524841 994.031250 -285.861908]
   ]
   "crane":[
      [354.968750 1245.173950 -280.512665]
   ]
   "death":[
      [-493.123108 838.203125 -643.968750]
      [676.419250 784.210632 -643.968750]
   ]
   "rocks":[
      [428.486115 123.968750 -405.701782]
   ]
}


EDIT: I see that comma is missing, I will edit it
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Wed May 08, 2019 3:40 pm

Ok, now the plugin load, excuses my mistake.

It also loads the files down but I see nothing in the map of the decals
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Sun Jun 02, 2019 6:58 am

I was able to pull this error from the logs maybe there is now a solution for HL2:DM

Code: Select all

[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 64, in paint_decals
    decals = self._decalcoords[self.map_name]
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 38, in __getitem__
    return self._data[key]
KeyError: 'dm_13thfloor_remake_rocks'

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 116, in on_client_active
    decalmanager.paint_decals([index])
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 67, in paint_decals
    self._compile_coords()
  File "../addons/source-python/plugins/decalpainter/decalpainter.py", line 84, in _compile_coords
    coords = json.load(f)
  File "../addons/source-python/Python3/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "../addons/source-python/Python3/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "../addons/source-python/Python3/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "../addons/source-python/Python3/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)

json.decoder.JSONDecodeError: Expecting ',' delimiter: line 3 column 18 (char 32)
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Map Decal Painter

Postby Ayuto » Sun Jun 02, 2019 7:13 am

The first error shouldn't happen if you use the latest version from GitHub. The second error is the same error you already posted here. Your coords file is malformed.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Mon Jun 10, 2019 8:40 am

I've looked through everything so far.
Despite all that not a single decal works. There are also no further errors.
I think it doesn't work in HL2:DM.

It would be great if this could be adjusted again.
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: Map Decal Painter

Postby Painkiller » Tue Jul 09, 2019 6:23 pm

Are there any new reasons why it doesn't work in HL2:DM ?

It loads normally there are no errors but on the server there are no decals to watch.

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 11 guests