GSF Mods Metatopic

Poll

Favorite Add-On(s)?

PTG
55 (16.3%)
Item Storage / RPGx
44 (13%)
Modter Interior Build Restriction
15 (4.4%)
Simplex Gen: 2D
18 (5.3%)
Maps
55 (16.3%)
Modular Terrain
53 (15.7%)
Vehicles
43 (12.7%)
Brick Plant Cost
10 (3%)
RPG Bot Tweaks
22 (6.5%)
Simplex Gen: 3D
3 (0.9%)
Day / Night Cycle Events
20 (5.9%)

Total Members Voted: 114

Author Topic: GSF Mods Metatopic  (Read 25790 times)

I believe that was on my request because I needed that function to recall the brick while I'm on salvage gamemodes.

The modter build restriction works great for gamemodes with public bricks. So if you make a map like my toystore it now functions like a classic interior map.
It would be great to see more ModTer-based maps be created, especially with the release of the restriction script. =) There were at least two or more others made a while back as well.

Does the ModTer restriction prevent you from building in Zone Bricks or Water bricks?
It currently only supports ModTer, but it can easily be modified to support zones and water bricks.

if(!isObject(%tmpBr = %client.player.tempbrick))
         return;


ffs, stop this. Just because the temp brick does not exist, does not necessarily mean the function should do nothing.



If you want this to support bricks planted by the duplicator and other building tools, you should package FxDtsBrick::plant(this) instead. If it shouldn't be placed, don't call the parent and return 1.
The build restriction add-on was made before the package for PTG was finalized, and that I simply forgot to update the build restriction package to adopt the fix included with PTG. Also, there's no reason to change the packaged function from "SERVERCMDPlantBrick" to "fxDtsBrick::onPlant" or "fxDtsBrick::Plant". Lord Tony requested for the brick not to be planted and then destroyed if it fails the restriction - for various reasons, which does work better.

The actual brick is created and exists before "fxDtsBrick::onPlant" and "fxDtsBrick::Plant" are called, so using "SERVERCMDPlantBrick" works just fine prior to having the brick exist. Also, calling the parent and terminating the function for "SERVERCMDPlantBrick" (if the temp brick doesn't exist) should allow both add-ons to work just fine.
« Last Edit: March 11, 2016, 11:23:16 PM by [GSF]Ghost »

Also works for that prop mod because it doesn't plant the prop then remove it. If props cost money that would be a waste of a prop.

I think you misunderstood. You will be able to duplicate bricks into modter, loading bricks will freely plant them inside modter, and any other building tool will also ignore your restrictions.

The normal procedure on planting a brick is like this:

1) create brick on position
2) call plant() - returns 0 or error code
3) if error, remove brick and noone will ever know

If you want to simulate bricks inside modter to be blocked, you have to make plant() return 1 and never call the parent that actually plants the brick. Anything planting bricks by script will handle the error code and get rid of it.

Also works for that prop mod because it doesn't plant the prop then remove it. If props cost money that would be a waste of a prop.

This does actually not work with the prop tool at all. It will simply bypass the restriction.

You will be able to duplicate bricks into modter, loading bricks will freely plant them inside modter, and any other building tool will also ignore your restrictions.
This is a script that was designed only to restrict players from planting bricks inside ModTer; loading bricks, using the duplicator and using the prop tool weren't a factor. However, if users need the the script to be changed to support restrictions related to the duplicator, loading bricks, etc. then I don't mind updating it and packaging the plant method, which will also allow using the default plant errors in unique ways anyway.

I'm particularly excited for Brick Plant Cost. Sounds like that would make for a spicy fort wars server.

I don't know what's going on but I can't update the pref to not restrict super admins from planting in modter bricks. I don't know if it's you or RTB.

I don't know if you can fix this but I can still make bricks float with ramped modter.


I don't know what's going on but I can't update the pref to not restrict super admins from planting in modter bricks. I don't know if it's you or RTB.
I don't know if you can fix this but I can still make bricks float with ramped modter.
Hmm, try changing the preference variables directly via the console and see if that helps. I'm also rewriting / improving the restriction script and will post an update very soon.

I'm particularly excited for Brick Plant Cost. Sounds like that would make for a spicy fort wars server.
The bot scripts and Brick Plant Cost will probably be the next add-ons I'll be releasing. =)

Version 1.1 of ModTer Interior Build Restriction has been released! This update includes:

Quote from:  v1.0.0  to  v1.1.0  Change  Log
  • Added classic brick error messages (Buried and Overlap) for certain situations
  • Changed packaged function to include restriction when loading bricks, using the New Duplicator, and when using other tools
  • Reworked relative brick position checks for wedge ModTer bricks
  • Improved functionality for checking multiple ModTer bricks a brick might be in
  • Added support for allowing most bricks to be planted on top of empty areas if at least one segment of the brick is attacked to another below it
  • Added new option for allowing / disallowing players from planting any of the ModTer bricks
  • Added support for preventing ModTer from being planted inside of normal bricks (when the restriction is enabled)


Also, I'll be releasing the Brick Plant Cost script later today. How does everyone feel about it using the auto-updater? I know some people have reservations about add-ons including it, and although it does make applying updates much easier, I don't mind leaving it out of future projects if needed.

i don't like auto-updaters

hmm

what will the bot scripts be like?

i don't like auto-updaters

hmm

what will the bot scripts be like?
Yeah, it'll probably be best to leave the auto-updater out of future add-ons. I may also remove it from the ModTer Restriction script and Simplex Gen in the following updates.

The scripts aren't anything advanced, they just affect when bots spawn / on death, and the items they have. Some of the scripts can probably be done through events, but they are meant mainly for setting up DMs or RPG servers. I'm open to any suggestions and requests as well.
« Last Edit: March 13, 2016, 03:49:30 PM by [GSF]Ghost »

How does the brick plant cost work, does it use score points or something?

How does the brick plant cost work, does it use score points or something?
Yes, the script uses a player's score as the currency. Before planting a brick, it'll check to see if the player has enough points to "purchase" that brick - if they do, it'll deduct the brick cost from their points and allow planting it, otherwise it won't. And you can either set a custom price for the brick (based on it's overall size), or set a constant price for all bricks.

I can also update it in a future update to allow using a variable as currency if needed, rather than player score points.