OpenXcom Forum

Modding => Help => Topic started by: Kilkakon on July 02, 2018, 09:41:11 am

Title: Addline + max uses?
Post by: Kilkakon on July 02, 2018, 09:41:11 am
Simple question for you guys, and I'm pretty sure the answer's "no", but thought worth asking regardless:

I am using addline in my mapscript to create some road segments. However, for each of my road groups, I want to have one of the modules only appear once, not any number of times as can happen currently. E.g. RXRRRR where R is the regular road tile and X is a car pileup. Multiple car pileups in a row would look a bit silly.

Is there a way to do this elegantly? Or do I have to make a large number of conditional addblock commands?
Title: Re: Addline + max uses?
Post by: Hobbes on July 02, 2018, 03:52:57 pm
I don't think you can use blocks and maxUses with addLine, which would solve your issue.

The alternative would be to add additional road mapblocks so that the one with the piled cars has a low chance of being selected, although it won't avoid that map block appearing more than once.
Title: Re: Addline + max uses?
Post by: Solarius Scorch on July 02, 2018, 04:04:10 pm
I think it would be reasonable to ask devs to add this feature (respecting maxUses in addLine). It is a versatile thing and probably shouldn't be too work intensive, though that's never easy to guess.
Title: Re: Addline + max uses?
Post by: Kilkakon on July 03, 2018, 06:46:34 pm
Thanks for the confirmation guys. I think you're right in that it could make a good feature :)

I've gone with Hobbes' suggestion of making a lot of regular variations to reduce the odds of having the unique one pop up more than once. The results seem pretty good so far :)