Jump to content

[Release] Base Copy/Paste


Recommended Posts

Installed MDC's version into AH. Can define the dome and select copy but get the following in the RPT:

 

========= Copying Objects [start] =========

Error in expression <on, _direction];

diag_log text str(_row + ",");

_row set [count _row, _x];

_obje>

  Error position: <+ ",");

_row set [count _row, _x];

_obje>

  Error Generic error in expression

 

Any ideas MDC?

Format has to be this way

[MAP_antenna_big_roof",[-29.0898,-27.542,39.8752],243.122],

[MAP_parabola_big",[-30.0898,-26.542,39.4382],18.1584],

[MetalFloor_DZ",[10.21,38.958,42.3615],49.0578],

[MetalFloor_DZ",[6.51074,40.7578,42.3465],1.60536]

 

 

RPT has it like this

 

"["MAP_antenna_big_roof",[-29.0898,-27.542,39.8752],243.122]"

"["MAP_parabola_big",[-30.0898,-26.542,39.4382],18.1584]"

"["MetalFloor_DZ",[10.21,38.958,42.3615],49.0578]"

"["MetalFloor_DZ",[6.51074,40.7578,42.3465],1.60536]"

 

notice no , at the end

I used Notepad + to replace "[" with [ and ]"  with ],  cntr f then replace all - worked great for me in AH

Link to comment
Share on other sites

Format has to be this way

[MAP_antenna_big_roof",[-29.0898,-27.542,39.8752],243.122],

[MAP_parabola_big",[-30.0898,-26.542,39.4382],18.1584],

[MetalFloor_DZ",[10.21,38.958,42.3615],49.0578],

[MetalFloor_DZ",[6.51074,40.7578,42.3465],1.60536]

 

 

RPT has it like this

 

"["MAP_antenna_big_roof",[-29.0898,-27.542,39.8752],243.122]"

"["MAP_parabola_big",[-30.0898,-26.542,39.4382],18.1584]"

"["MetalFloor_DZ",[10.21,38.958,42.3615],49.0578]"

"["MetalFloor_DZ",[6.51074,40.7578,42.3465],1.60536]"

 

notice no , at the end

I used Notepad + to replace "[" with [ and ]"  with ],  cntr f then replace all - worked great for me in AH

What I put in the post above is the actual RPT after doing the ingame base copy, so there's an error in the script itself. But i used the OP version and set it to use the F6 key to activate the menu vs opening the menu when you first login and seems to be working fine now. I just don't have MDC's export to SQF. But that's not an issue at this point.

Link to comment
Share on other sites

 

https://gist.github.com/maca134/d959907cb974a90826eb

 

Run the script however you run scripts.

 

PS. Might be a cool idea for people to share bases?

 

 

I have base with one building, code MBG_Warehouse_InEditor  also metal floor, cinder block gate, but when i copy base only crafting objects be copied, house wont, is there way to add this one building into script or somhow make it copieable?

Warehause i  build same way as metal floor, cinder wall 

Link to comment
Share on other sites

Installed MDC's version into AH. Can define the dome and select copy but get the following in the RPT:

 

========= Copying Objects [start] =========

Error in expression <on, _direction];

diag_log text str(_row + ",");

_row set [count _row, _x];

_obje>

  Error position: <+ ",");

_row set [count _row, _x];

_obje>

  Error Generic error in expression

 

Any ideas MDC?

 

Change diag_log text str(_row + ","); to

diag_log (text + str(_row) + ",");

in most cases a generic error means you are trying to cram together two different types of variables. In this case you were putting together an array and a string, then converting it to a string.

Link to comment
Share on other sites

  • 1 month later...
Hello.
No I get put 2 bases to build.
I do wrong?
This is part of the code of the AH
BCBaseList = [
		[
		"base1",
		"Test Base",
		[0,23,0],
		[
		["CinderWallDoor_DZ",[0.0551758,-0.736328,3.37357],239.861],
		["MetalFloor_DZ",[2.53516,0.763672,6.58356],59.9374],
		["MetalFloor_DZ",[2.54492,0.763672,3.19955],59.8886],
		["MetalFloor_DZ",[-2.00488,-1.83691,6.58356],239.937],
		["MetalFloor_DZ",[-2.00488,-1.83691,3.19955],239.889],
		["CinderWall_DZ",[-4.20508,1.36328,3.38358],150.186],
		["CinderWallDoorSmall_DZ",[-2.5249,3.76367,3.38358],239.993],
		["FireBarrel_DZ",[4.40527,1.86328,3.43457],59.2191],
		["CinderWallDoor_DZ",[4.78516,2.06348,-0.000427246],59.9374],
		["MetalFloor_DZ",[-0.0947266,5.26367,6.58356],239.937],
		["MetalFloor_DZ",[-0.0947266,5.26367,3.19955],59.8886],
		["WoodSmallWallThird_DZ",[4.84521,2.06348,3.38358],239.847],
		["WoodSmallWallThird_DZ",[4.89502,1.96289,3.38358],59.8468],
		["MetalFloor_DZ",[-4.63477,2.66309,3.19955],239.889],
		["MetalFloor_DZ",[-4.63477,2.66309,6.58356],59.9374],
		["CinderWall_DZ",[-0.214844,-5.63672,3.38358],329.709],
		["CinderWallDoorSmall_DZ",[2.71484,-5.23633,3.39355],59.7286],
		["MetalFloor_DZ",[5.16504,-3.83691,6.58356],239.937],
		["MetalFloor_DZ",[5.1748,-3.83691,3.19955],59.8886],
		["MetalFloor_DZ",[0.625,-6.43652,6.58356],59.9374],
		["MetalFloor_DZ",[0.635254,-6.43652,3.19955],239.889],
		["CinderWall_DZ",[6.18506,2.76367,3.38358],60.0843],
		["CinderWallDoorSmall_DZ",[2.33496,6.36328,-0.000427246],59.7633],
		["CinderWall_DZ",[-1.50488,7.46289,3.38956],329.972],
		["CinderWall_DZ",[-1.54492,7.46289,-0.000427246],150.363],
		["CinderWall_DZ",[-6.04492,4.76367,-0.000427246],148.928],
		["CinderWallDoorSmall_DZ",[7.34521,-2.33691,0.009552],59.8816],
		["CinderWallHalf_DZ",[-6.23486,4.66309,3.38956],149.364],
		["MetalFloor_DZ",[7.08496,3.36328,6.58356],59.9374],
		["MetalFloor_DZ",[-6.54492,-4.53711,3.19955],239.889],
		["MetalFloor_DZ",[-6.54492,-4.53711,6.58356],239.937],
		["MetalFloor_DZ",[5.36523,6.36328,3.18356],59.7772],
		["CinderWall_DZ",[8.55518,1.06348,-0.000427246],149.939],
		["CinderWall_DZ",[-8.59473,-1.13672,3.38358],150.109],
		["MetalFloor_DZ",[8.90527,0.263672,3.19357],59.8189],
		["CinderWall_DZ",[6.375,-6.23633,3.37958],149.81],
		["CinderWall_DZ",[6.375,-6.23633,-0.000427246],329.81],
		["Sandbag1_DZ",[6.68506,6.16309,-0.00143433],329.956],
		["MetalFloor_DZ",[4.44482,7.96289,3.19955],59.8886],
		["MetalFloor_DZ",[4.45508,7.96289,6.58356],59.9374],
		["MetalFloor_DZ",[-9.1748,0.0634766,6.58356],239.937],
		["MetalFloor_DZ",[-9.1748,0.0634766,3.19955],239.889],
		["CinderWallHalf_DZ",[1.60498,-9.03711,3.37958],149.81],
		["CinderWall_DZ",[1.60498,-9.03711,-0.000427246],329.81],
		["CinderWall_DZ",[-4.58496,-8.13672,3.38358],329.818],
		["CinderWallDoorSmall_DZ",[7.10498,6.36328,3.39755],330.226],
		["MetalFloor_DZ",[8.5752,4.26367,3.19357],59.7494],
		["MetalFloor_DZ",[8.70508,4.26367,6.58755],59.9444],
		["MetalFloor_DZ",[9.71484,-1.13672,6.58356],59.9374],
		["MetalFloor_DZ",[-3.90479,-9.03711,3.19955],239.889],
		["MetalFloor_DZ",[-3.91504,-9.03711,6.58356],239.937],
		["CinderWallDoorSmall_DZ",[9.78516,1.76367,3.39755],149.591],
		["WoodStairsSans_DZ",[9.64502,-3.23633,0.299561],149.952],
		["WoodSmallWallThird_DZ",[10.1748,-1.83691,3.37756],149.842],
		["WoodSmallWallThird_DZ",[10.2148,-1.73633,3.37756],329.842],
		["CinderWall_DZ",[3.24512,10.1631,-0.000427246],150.363],
		["CinderWall_DZ",[3.24512,10.1631,3.37958],330.363],
		["CinderWall_DZ",[-9.03516,-5.73633,-0.000427246],60.2108],
		["CinderWall_DZ",[-9.60498,-4.73633,3.38956],60.2249],
		["CinderWall_DZ",[-10.5649,2.16309,-0.000427246],150.057],
		["CinderWallHalf_DZ",[-10.5649,2.16309,3.37958],330.057],
		["CinderWall_DZ",[-8.23486,-7.13672,3.38956],60.0563],
		["CinderWall_DZ",[6.85498,9.16309,3.37958],60.0283],
		["CinderWall_DZ",[6.85498,9.16309,-0.000427246],240.028],
		["CinderWall_DZ",[-11.5552,-1.33691,-0.000427246],60.3165],
		["CinderWallHalf_DZ",[-11.5552,-1.33691,3.37958],240.317],
		["CinderWall_DZ",[11.1353,-3.43652,-0.000427246],329.81],
		["CinderWall_DZ",[11.1353,-3.43652,3.37958],149.81],
		["CinderWallHalf_DZ",[-2.60498,-11.4365,3.37958],150.089],
		["CinderWall_DZ",[-2.60498,-11.4365,-0.000427246],330.089],
		["CinderWallHalf_DZ",[10.7451,5.46289,3.37357],59.9723],
		["CinderWall_DZ",[12.0649,0.163086,3.37958],60.1405],
		["CinderWall_DZ",[12.0649,0.163086,-0.000427246],240.14],
		["CinderWall_DZ",[-6.29492,-10.5371,-0.000427246],60.2108],
		["CinderWallHalf_DZ",[-6.29492,-10.5371,3.37958],240.211],
		["WoodStairsSans_DZ",[12.2749,-1.63672,-2.20044],149.947]
		]
	        ]
	        [
		"base",
		"cubo",
		[0,23,0],
		[
		["MetalFloor_DZ",[0.0639648,-1.396,2.95478],177.999],
		["CinderWallDoor_DZ",[-0.0439453,1.46582,-0.265489],177.999],
		["CinderWall_DZ",[-2.69385,-1.38428,-0.265581],267.998],
		["CinderWall_DZ",[2.80615,-1.18408,-0.265171],267.998],
		["CinderWall_DZ",[0.15625,-4.03418,-0.265218],177.999]
		]
	        ]
];
Link to comment
Share on other sites

We decided to use this script over at FP to help convert players' bases into map edits. With this in mind, I added SQF export functionality to it, and fixed the deletion so that it isn't blocked by infiSTAR's PVDZE_obj_delete interception.

 

Here's the modified version, I add this underneath fnc_AdminBaseDestruction:

 

fnc_AdminBaseDestruction  ??   Are you talking about Infrastar with this .. NOT using it .. but I really want the ability to take a existing map build, add stuff in easily that are not so easy in editor, ( insert, save, adjust, save, adjust, save, adjust save........ ) badd enough with big items.. but stuff like adding walkways etc .. OMG will give you a stroke! RFLOL

 

Then save the adds, either to an additional sqf to have the new stuff added to the building ... or if it gets all including the original building adds and converts to new sqf .. even better!.

Thanks in advance

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

hi,

 

we run an GTX Gaming Server with Supported Infistar. so we do NOT have full access to the whole AH and AHConfig file... only fragments of it.

 

as i can see, this script is implemented also on our server. we can call it by F4

 

where can i find this base_manager.sqf on our ftp? if it is there?

 

then i like to know how to keep the saved structures in database, when using a plot4life. 

 

1. i used to build the p4l pole after my save of the structure into database. after that, all the structures got deleted from database. dunno why...they simply vanish. 

2. then i tried to place an plot4life pole first, next spawn the prebuild base around it, place the center/radius, hit save to db, but if i do that, this save option saves 0 items up to db.. 

what can we do? 

Link to comment
Share on other sites

  • 4 weeks later...
Hello guys! I use infistar and this great release came already included, everything works perfectly, but not I save in the database or export in SQF, on the "save" me is the message add 0 objects to database. When I export the message is "basis exported to logs in SQF format. But not match any meeting in the place sqf file.
 
My other doubt is when I paste a base and fixed it to not disappear into the restart? Insert all the pieces?
Thank you all!
Link to comment
Share on other sites

Hmm this is somewhat awesome and somewhat terrible (sorry).

Yes it is cool to copy + paste, but isn't this a large hit in the face for epoch? I mean, when epoch started you was meant to build bases and eberybody loved it. Then missions came in and became a major part of the game and ofc bases are made a lot faster. Need 2 hours for 5 walls pah, buy a chainsaw or buy the complete wall!

Now you can copy + paste your 5 walls long side and insert it a hundret times to build a ridiculously large tower within minutes. That can't be right!

Link to comment
Share on other sites

Hmm this is somewhat awesome and somewhat terrible (sorry).

Yes it is cool to copy + paste, but isn't this a large hit in the face for epoch? I mean, when epoch started you was meant to build bases and eberybody loved it. Then missions came in and became a major part of the game and ofc bases are made a lot faster. Need 2 hours for 5 walls pah, buy a chainsaw or buy the complete wall!

Now you can copy + paste your 5 walls long side and insert it a hundret times to build a ridiculously large tower within minutes. That can't be right!

Youve just completely misunderstood the point of the script. This is not for players, its for admins. Its so you can save/ remove / copy a base for later use. Not for players to dick around with.

Link to comment
Share on other sites

Youve just completely misunderstood the point of the script. This is not for players, its for admins. Its so you can save/ remove / copy a base for later use. Not for players to dick around with.

Yep! I agree! But I think he confused the function of this release.
No one else had a similar problem to mine? The release is great but loses the purpose if we can not save the database or export.
 
*Forgot to mention, although I do not know if makes no difference but my host is Vilayer
Link to comment
Share on other sites

 

 

This is correct. Infistar is most likely using an event handler for it. The normal use of it is:

diag_log "RPT output text";

 

fer_haka, on 14 Apr 2015 - 11:59 PM, said:

 

Ok, I understand, he saved to log rpt. But how to fix the AH file if my log shows me that?

 

16:54:29 Server: Object 14:162 not found (message 91)
16:54:48 Server: Object 18:279 not found (message 94)
16:54:48 Server: Object 18:276 not found (message 94)
16:54:48 Server: Object 18:277 not found (message 94)
16:54:48 Server: Object 18:278 not found (message 94)
Link to comment
Share on other sites

  • 4 months later...

I got it to work also, its a fantastic feature. I have been using this with a spawn building script and save to hive system. Now i can create "admin" missions and save them to file for later use. 

 

I am also working on a way to add "Spawn" - AI groups vehicles and static guns through infistar as i want to be able to create live AI events in-game.

 

IF anyone knows of a existing mod for this i would be extremely grateful for the hookup.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...