Jump to content
tinter

Tinter-Furniture - MP-compatible and dynamically spawned furniture

Recommended Posts

Thanks for all the feedback, a late reply as I was on vacation.

The amount of furniture is probably the biggest impact on performance, more so than actually spawning it, but Diwako is right that they're all local simple objects.

I think the compositions and thus also the amount of furniture per building, should be decided by the individual mission maker with regards to how much they want to compromise and what else is in their mission.

 

I've thought about making modules and such, but that would require me to make this into a mod.

It could probably be made into a mod, but I think overall that the concept fits a script best, as the mission really needs to be added with furniture in mind.

You could get away with this, by letting the player set the furniture, but first of all respecting mission settings, if any, and having a debug menu to remove furniture in houses that shouldn't have them.

Maybe some day, but probably not for the near future.

Share this post


Link to post
Share on other sites

Dear Tinter (and modders).

Firstly, I will join the others in saying this is a very elegant script that saves lots of performance and mission development time(!). I've tested it with several missions in different towns, and the performance impact is quite acceptable.

I had a question, all the same. 

 

Is there a to remove the CBA dependency of the script? I took a dive into the script and it seems you use the following functions:

CBA_fnc_createNamespace  
CBA_fnc_players  
CBA_fnc_addEventHandler
CBA_fnc_execNextFrame
CBA_fnc_waitAndExecute
CBA_fnc_globalEvent

I suppose my question is two-fold:

1) Firstly, many of these functions (eg createNameSpace) have a vanilla equivalent; why did you use the CBA versions? 
2) And secondly, would you mind if I created an alternate script that loaded these functions during mission startup, thereby removing the mod dependency?

I am aware this could be seen as a step backwards in terms of performance (no caching of functions before mission start), and compatibility (no updates of CBA). And, that I am technically reverse engineering the hard work of CBA (who I will obviously credit in FULL). I don't want to step on any toes. But, because I work exclusively with public servers that have zero mod dependencies, I have a strong incentive to remove dependencies from missions. 

  • Like 1

Share this post


Link to post
Share on other sites
18 hours ago, Melody_Mike said:

Dear Tinter (and modders).

Firstly, I will join the others in saying this is a very elegant script that saves lots of performance and mission development time(!). I've tested it with several missions in different towns, and the performance impact is quite acceptable.

I had a question, all the same. 

 

Is there a to remove the CBA dependency of the script? I took a dive into the script and it seems you use the following functions:

CBA_fnc_createNamespace  
CBA_fnc_players  
CBA_fnc_addEventHandler
CBA_fnc_execNextFrame
CBA_fnc_waitAndExecute
CBA_fnc_globalEvent

I suppose my question is two-fold:

1) Firstly, many of these functions (eg createNameSpace) have a vanilla equivalent; why did you use the CBA versions? 
2) And secondly, would you mind if I created an alternate script that loaded these functions during mission startup, thereby removing the mod dependency?

I am aware this could be seen as a step backwards in terms of performance (no caching of functions before mission start), and compatibility (no updates of CBA). And, that I am technically reverse engineering the hard work of CBA (who I will obviously credit in FULL). I don't want to step on any toes. But, because I work exclusively with public servers that have zero mod dependencies, I have a strong incentive to remove dependencies from missions. 

Thank you, I'm glad to hear when someone finds this useful.

As for why I use the CBA functions, it's because I think their functions are nice and convenient. I'm not sure if any of the functions I've used have a vanilla function that does the same. I find that even if they seem to be the same they might often differ in the details.

As for modifying the script, you are allowed to modify it in any way you see fit, but of course I can't give you permission for any CBA stuff.

  • Like 2

Share this post


Link to post
Share on other sites

Appreciate the answer.
 

Quote

 I find that even if they seem to be the same they might often differ in the details.


^ This is exactly why I asked the question :float:. I realize that you coded this, along with others, a while ago. But it would help if you could give pointers why you chose the CBA versions of those functions, so I can maybe skip certain bits by replacing them with vanilla commands. The CBA documentation on the website is a bit cryptic, and doesn't always explicitly state the differences between CBA and vanilla functions. 

 

Quote

As for modifying the script, you are allowed to modify it in any way you see fit, but of course I can't give you permission for any CBA stuff.


Thank you for the permission. I will not release the modified version in any way, but simply post it in this forum. And if anyone objects to my attempt at recreating CBA functions, they can of course object and contact me as well. I just want to keep things transparent. This is all just a self imposed coding exercise for me, really.  

Thanks again.

  • Like 2

Share this post


Link to post
Share on other sites
10 minutes ago, Melody_Mike said:

Appreciate the answer.
 


^ This is exactly why I asked the question :float:. I realize that you coded this, along with others, a while ago. But it would help if you could give pointers why you chose the CBA versions of those functions, so I can maybe skip certain bits by replacing them with vanilla commands. The CBA documentation on the website is a bit cryptic, and doesn't always explicitly state the differences between CBA and vanilla functions. 

 


Thank you for the permission. I will not release the modified version in any way, but simply post it in this forum. And if anyone objects to my attempt at recreating CBA functions, they can of course object and contact me as well. I just want to keep things transparent. This is all just a self imposed coding exercise for me, really.  

Thanks again.

I can't remember the details well enough to tell you without having to analyze my code. Your best bet would be to use the ingame function viewer so you can see what the actual code of the CBA functions do. Even the headers usually tell you what the function is for, along with any deviation from similar functions.

  • Like 2

Share this post


Link to post
Share on other sites

New release again!

Turns out that this script would stop missions from loading when played on a dedicated server. G4rrus reported and nearly fixed this himself.

Get it here!

 

And my apologies to anyone who might've tried to use this on a dedicated server, only to get a confusing and hard to diagnose result.

  • Like 3

Share this post


Link to post
Share on other sites

Got a few mores fixes rolled out.

The most important is furniture sometimes spawning twice, due to two issues appearing at the same time. I got it somewhat fixed, but it might not cover all cases.

https://github.com/Tinter/Tinter-Furniture/releases/tag/v2.0.2

 

And for I released a mod version of this for anyone interested who don't happen to be mission makers.

https://forums.bohemia.net/forums/topic/231111-tinter-furniture-dynamic-furniture-as-a-mod/

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you for this!
I'm sure my group and I can benefit from it

Share this post


Link to post
Share on other sites

unknown.png

So I have now updated the script and the mod so that they both use CBA settings and the mod will turn off if a mission is using the script, avoiding spawning the wrong furniture if the mission is set to use something else.

Other than that I have now also added the classnames for Global Mobilization buildings. No compositions yet, but it's one step closer.

As always, get it here: https://github.com/Tinter/Tinter-Furniture/releases

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Thanks to lelop we have now a nice new set of compositions for Livonia buildings! It is available now.

unknown.pngunknown.pngunknown.png

  • Like 9

Share this post


Link to post
Share on other sites

Finally got around to releasing a new update, I'll leave you with the changelog this time.

Quote

Added non-modern Livonia compositions
Added support for Cam Lao Nam houses
Added compositions for Cam Lao Nam
Added compositions for Weferlingen
Added CUP compositions for Weferlingen
Added compositions for Rosche
Added compositions for the industrial shed
Military compositions are now included by default
Changed the names of compositions files
Compositions files have a bit more info
Fixed furniture spawning in some destroyed buildings

 

  • Like 5

Share this post


Link to post
Share on other sites

Is there any chance of adding Vidda to the list of maps covered by your mod?

 

  • Like 1

Share this post


Link to post
Share on other sites
On 11/17/2021 at 12:02 PM, jgaz-uk said:

Is there any chance of adding Vidda to the list of maps covered by your mod?

 

It depends on the map, I am not familiar with Vidda, but if it uses houses used on any of the normal maps, then it should already be covered.

If it uses custom houses, then the limiting the factor is and always will be making compositions of furniture. They take a lot of time and effort for me to make and I have even less time now so I don't see myself making anymore for quite a while at least.

Share this post


Link to post
Share on other sites

@tinter
Hello!!

Any option to exclude a specific area?

Why? 
I want to run your furniture script but I want that a specific house will be excluded so I can make the specific thing I want for this specific house (example: make a specific house a lab for a specific task.)

Any way of doing it that I might have missed?

 

Also, second question - 
What about AI pathing and shooting positions? Does the script take it into consideration?

 

Thanks a lot again!

 

Share this post


Link to post
Share on other sites
On 11/21/2021 at 4:44 PM, omri2050 said:

@tinter
Hello!!

Any option to exclude a specific area?

Why? 
I want to run your furniture script but I want that a specific house will be excluded so I can make the specific thing I want for this specific house (example: make a specific house a lab for a specific task.)

Any way of doing it that I might have missed?

 

Also, second question - 
What about AI pathing and shooting positions? Does the script take it into consideration?

 

Thanks a lot again!

 

I've described a method for excluding a specific area here.

As far as considerations go, not specifically, but I've tried to keep furniture out of the way.

  • Like 1

Share this post


Link to post
Share on other sites
21 minutes ago, tinter said:

I've described a method for excluding a specific area here.

As far as considerations go, not specifically, but I've tried to keep furniture out of the way.

Perfect. Thanks a lot

Share this post


Link to post
Share on other sites
On 11/20/2021 at 1:44 PM, tinter said:

It depends on the map, I am not familiar with Vidda, but if it uses houses used on any of the normal maps, then it should already be covered.

If it uses custom houses, then the limiting the factor is and always will be making compositions of furniture. They take a lot of time and effort for me to make and I have even less time now so I don't see myself making anymore for quite a while at least.

Its on Steam https://steamcommunity.com/sharedfiles/filedetails/?id=1282716647

 

Its a really nice map. Some of the houses & buildings are covered by your mod from other maps, but there are a number of new buildings that are not covered by your great addon 👍

 

Share this post


Link to post
Share on other sites
On 11/25/2021 at 12:18 PM, jgaz-uk said:

Its on Steam https://steamcommunity.com/sharedfiles/filedetails/?id=1282716647

 

Its a really nice map. Some of the houses & buildings are covered by your mod from other maps, but there are a number of new buildings that are not covered by your great addon 👍

 

Sorry for being so late to reply. I think it would be best if you could file these buildings under an issue on github, with preferably classnames, maybe just pictures. That way I and potentially other people can get a clear idea of what needs doing, as "some houses & buildings" is a little vague. Thanks!

Share this post


Link to post
Share on other sites

OK will have  look for Vida new buildings class names;

 

On another subject; I cant seem to get your "Furniture" to work with ACE is there a workaround?

 

2.1.4 didn't work with ACE for me but the 2.0.1 did. so I'll use that.

 

Share this post


Link to post
Share on other sites

Just wanted to say that Halek's Ravage Furniture script was optimized for the latest version and is several times faster, perhaps @tinter could take a look to benefit from those improvements as well.

Share this post


Link to post
Share on other sites

Hello @tinter!
How are you?

Hope all is well 🙂

Q:

I tried to make SQF file with compositions to Western Sahara DLC, but it's not working..Do I need to do something special for the script to work with this DLC?

 

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites
On 1/12/2022 at 10:03 PM, omri2050 said:

Hello @tinter!
How are you?

Hope all is well 🙂

Q:

I tried to make SQF file with compositions to Western Sahara DLC, but it's not working..Do I need to do something special for the script to work with this DLC?

 

Thanks!

Quite possibly, if you are working with the new buildings, then I have not added support for those yet. The relevant buildings need to manually be added to a list and some times this involves cross checking which buildings are the same but slightly different. I just forgot about it mostly, but I will try to get it done soon.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×