Search found 203 matches

by LordAwsomeness
March 5th, 2020, 1:30 am
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Re: Using [resource] and [load_resource]

no, you shouldn't put the LA_RPG_ERA_RESOURCE_PACKAGE macro in the scenario, the point of [load_resoruce] is exactly that you just have to write {LA_RPG_ERA_RESOURCE_PACKAGE} once in your addon (instead of fop putting in each scenario). If it doesnt work then then there is maybe something else wron...
by LordAwsomeness
March 4th, 2020, 6:47 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

I'm not familiar with [load_resource]. The reason I mentioned lua originally though is that lua functions don't suffer from the problem WML macros do, that being, lua functions don't get touched by the preprocessor - that example I gave would stay 44 lines if it were in lua instead of getting expan...
by LordAwsomeness
March 4th, 2020, 6:34 pm
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Re: Using [resource] and [load_resource]

as i said before, load_resource can only give improvements if you have a macro that is used in multiple scenario/era/multiplayer etc tags. So if you are just developing one era it won't help you. But I also said that it's macros are getting used by multiple scenarios rather than just one so it gets...
by LordAwsomeness
March 4th, 2020, 5:56 pm
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Re: Using [resource] and [load_resource]

Okay I have tried several different ways of trying to use resource and load resource but it isn't working. Is there somebody who could potentially explain what exactly I need to put in the resource tag? I would be very grateful as with the current iteration of my era it cannot even be played with th...
by LordAwsomeness
March 4th, 2020, 1:43 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

BTW, you should take a look at LotI item management system. I modified it for my add-on (Legens of Idaamub), so maybe you can modify it too for your purpose. Thank you for the suggestion. I'll definitely download it and see what I think after I get off of work today. Are you suggesting it because y...
by LordAwsomeness
March 4th, 2020, 1:50 am
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Re: Using [resource] and [load_resource]

I made the resource tags in the era page and dropped all of the events in it as such: [resource] id=la_always_active_event {LA_RPG_ERA_RESOURCE_PACKAGE} [/resource] this I placed in the toplevel of the era.cfg in the core addon. next i "loaded" the resources in the scenario as such: [load_...
by LordAwsomeness
March 3rd, 2020, 9:47 pm
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Re: Using [resource] and [load_resource]

[resource] is not supposed to give any performance benefit at all. well this is not complteley true, if you have one addon that for example contains many scenrios and you want to want to use a code in each of those scenarios and would otherwise do that by putting a macro in each of those scenarios,...
by LordAwsomeness
March 3rd, 2020, 7:25 pm
Forum: WML Workshop
Topic: Using [resource] and [load_resource]
Replies: 15
Views: 1387

Using [resource] and [load_resource]

Once again hi all. So I am attempting to optimize my load times and help my add-ons that rely on each other not crash wesnoth on lower end PC's, in order to attempt to do that I've been researching a lot of optimization options. One of which options would be to use the [resource] and [load_resource]...
by LordAwsomeness
March 3rd, 2020, 6:29 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

The example is not WML, but if changed to WML syntax, for example #define EXAMPLE [a] a=1 b=2 c=3 d=4 e=5 [/a] #enddef then you can run wesnoth -p _main.cfg out to get the preprocessed content. That is what I tried on your addon when I got out of memory. I think I've never gotten an issue with runn...
by LordAwsomeness
March 3rd, 2020, 6:26 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

The preprocessor takes all your macros, and substitutes in the actual text of the macros. So for example: That's just 44 lines of text there, but the preprocessor expands that out so that there are no macros present. The {C} is instead replaced by 1000 copies of the contents of EXAMPLE, which means...
by LordAwsomeness
March 1st, 2020, 10:46 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

So, just to establish a starting point, do you have an understanding of how the preprocessor handles macros and how that ends up creating a cache entry that's 68 MBs? unfortunately I actually dont have any understanding of it. I just guess by the name preprocessing it does things before the game be...
by LordAwsomeness
March 1st, 2020, 9:04 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

Ravana wrote: March 1st, 2020, 8:07 pm Thats why find one part to rewrite, not all of it.
okay so do I need to rewrite the macro or reduce the amount of macros I have and write them the standard way?
by LordAwsomeness
March 1st, 2020, 7:52 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

Too many too large too nested macros. When you have the 68MB file you can check what parts take most space there, and then try to optimize/rewrite that part. nested macros are macros inside of other macros, yes? how can I rewrite those though? it would be an obscene amount of work to have to re-wri...
by LordAwsomeness
March 1st, 2020, 7:03 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

I tried to load this addon, and got "Ran out of memory. Aborted." What I did see already was several cases of 20200301 20:53:19 warning preprocessor: Redefining macro UNIT_SPAWN_GUARD without explicit #undef at ~add-ons/LA_MP_Pack/macros/misc.cfg:57 included from ~add-ons/LA_MP_Pack/utils...
by LordAwsomeness
March 1st, 2020, 6:22 pm
Forum: WML Workshop
Topic: Option limit?
Replies: 36
Views: 2717

Re: Option limit?

Could you upload your add-on somewhere? I can see if it will crash for me as well. https://drive.google.com/file/d/1oxlREG-O9SLH4AZCQrO8bhQ9cCQyqRbX/view?usp=sharing its in a zip file for you. I think it will still allow you to download it EDIT: im starting to think every time I make a change to fi...