Legend of the Invincibles

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply

Which of these crafting recipes you are using or planning to use? Unpopular ones will be reworked.

The End of All that Is
4
9%
Gloombringer
1
2%
Soul Eclipse
3
7%
Guerilla
5
11%
Scaryface
6
13%
Thundering Revenge
2
4%
Marie Byrd
3
7%
Marrowrend
11
24%
Deathblade Inheritance
0
No votes
Soul Render
10
22%
 
Total votes: 45

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 24th, 2016, 11:25 am

I... somehow didn't think of the possibility to insert it when picking. In that case, you insert just one item, an operation whose complexity can be linear (if sorted by item type number).

Also, I would like a discussion about this:
I was thinking about a solution to the problem of letting the enemy recruit to farm, because exp and items are worth more than early finish bonus. There were some ideas, but I think that I have found something that could work for everyone:

If your enemy sees that you're advancing too quickly (too many turns of early finish bonus), he will get desperate to stop you. He will summon Beelzebub, a great demon. The fight will be optional, he will leave obvious traps to bring him near you and you will be allowed to choose if you want to activate it if you step on one. Once it's activated, Beelzebub will appear and join one of the enemy sides. He would have a very high level (tons of experience) and would drop many items (or would drop some items only he can drop).
Last edited by Dugi on February 24th, 2016, 11:34 am, edited 1 time in total.

User avatar
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Legend of the Invincibles

Post by matsjoyce » February 24th, 2016, 11:27 am

Yeah, you could even make it logarithmic if you assume that the list is already sorted. I've just written a binary search insert thingy, so I'll see if that works.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 24th, 2016, 11:38 am

Not logarithmic. The array is not a linked list, adding an element into the middle has linear complexity. Finding where to put it has logarithmic number of comparisons, but if the names are looked up to sort it alphabetically (linear complexity), the result may be O(n.log(n)).

For completeness, when writing the inventory code, I had no idea what complexity is, so I designed it without regard to that.

User avatar
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Legend of the Invincibles

Post by matsjoyce » February 24th, 2016, 12:12 pm

Well, the WML is logarithmic, as the linear bit can be done in C++ by

Code: Select all

[set_variables]mode=insert
, so logarithmic WML or loglinear if you consider both WML and C++. Anyway, here's my code. It seems to work, but I couldn't generate enough items to give it a thorough test. I'll keep testing it, but here it is (diff attached), in case you can make any suggestions (been a while since I did WML, and its still horrible...).
Attachments
diff.diff
The diff
(4.51 KiB) Downloaded 73 times

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 24th, 2016, 12:27 pm

It doesn't work as supposed, something breaks and the item is put at the beginning of the list. See my attached save file:
LotI1-Test_Scenario_Item_Sorting.gz
(250.38 KiB) Downloaded 67 times
I'll have a look at it when I have time.

Btw, your diff was bad, it was describing the change from your modified version to the official version, not inversely. But there wasn't too many changes and I could merge it manually.

User avatar
Celtic_Minstrel
Developer
Posts: 1529
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Legend of the Invincibles

Post by Celtic_Minstrel » February 24th, 2016, 1:54 pm

If you want to sort stuff, why not do it in Lua?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 24th, 2016, 2:00 pm

Because most of the code is written in WML and I don't want anyone who wants to read my code to need to know both WML and lua and how do they mix. There is stuff that can be done only in lua, but this isn't neither very important nor not doable.

User avatar
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Legend of the Invincibles

Post by matsjoyce » February 24th, 2016, 6:38 pm

OK, found some problems. I don't know how it sorted for me, but I've given it a good testing now (~70 items added), and it works great. I've attached a diff (right way round now :oops: )). If the inventory already contains items, it will probably do some sort of grouping, but won't sort the existing items, so its a sort of clean start requiring feature.
Attachments
diff.diff
The diff, v2
(5.44 KiB) Downloaded 66 times

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 24th, 2016, 6:49 pm

Yes, it works. Thanks.

Zarkussell
Posts: 38
Joined: December 31st, 2015, 3:00 am

Re: Legend of the Invincibles

Post by Zarkussell » February 25th, 2016, 12:08 am

Would it be possible for you to re-upload this campaign as 10 seperate parts like it was before? So that users on the iPhone can attempt to play through the entire campaign. Conversely, does anyone know of a certain path to take to avoid giving too many options when using the soul eater ability?

ItsDaKoolaidDude
Posts: 34
Joined: June 14th, 2012, 4:19 am
Location: Roommate with a dragon in Heart Moutains

Re: Legend of the Invincibles

Post by ItsDaKoolaidDude » February 25th, 2016, 9:02 am

Curiously, some scenarios in chapter 1 turns every one of my units attack powers immediately 0 once hit by the rain, which just makes everything a living nightmare, even on easy. (I had to commit a serious crime which was to sacrifice several level 4 units and send them on suicide runs just to be decoys and meat-shields because they couldn't be the strong bruisers they were anymore) my poor juggernauts ;_;
And on certain ones where it takes a long time, I had to resort to Debug commands just to get a move on because now, NO ONE had any strength to kill anything and simply died in droves.
Besides that, I understand why you had put the blood rain in there to prevent people from sticking around too damn long, and quite frankly I'm somewhat guilty of it too since I tend to grind each scenario for the items and what not.
But give us some breathing room over here! Whats the point of going and looking for those dropped items in each scenario if the rain prevents you from giving them so much as a simple "Oh hey look at that."
You spent the entire game, going in circles! It's like the equivalent of Homer Simpson doing cartwheels on the kitchen floor, and you still won?! -Johnny (BSC)

User avatar
matsjoyce
Posts: 233
Joined: May 8th, 2011, 2:10 pm
Location: UK

Re: Legend of the Invincibles

Post by matsjoyce » February 25th, 2016, 10:23 am

@Zarkussell
10 different campaigns would mess with units being carried though, so either you would have to start a brand new army (very hard in the inferno) or have a global variable holding the units, in which case you would not be able to play two LotI runs simultaneously without getting the armies mixed up / overwritten / merged.

Zarkussell
Posts: 38
Joined: December 31st, 2015, 3:00 am

Re: Legend of the Invincibles

Post by Zarkussell » February 25th, 2016, 7:46 pm

Previously, the campaign was uploaded as 10 distinct sub categories, and I was able to choose which set of levels to play. I did not have the time then however to spend on the game. I'm not sure how to solve the army issue, but perhaps there could be an upgrade only iPhone users would choose that doesn't do anything, but prevents the list from getting longer, so we can still play.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » February 25th, 2016, 8:50 pm

@Zarkussell
It was annoying to maintain and buggy. It was also cluttering the list of campaigns. I asked if anyone uses it and got no reply for long. So I went on and removed it. It's not easy to bring it back at this time. I believe that if you avoid using redeem from the start, it should be doable, although it will have a large impact on gameplay.
The iPhone problem can't be fixed without jailbreaking your phone. It works on Android perfectly afaik.

@ItsDaKoolaidDude
It will start later from the next version. I am also making it start later on easy and slightly later on normal than on hard.
But I think that your units' damage is too low, if the unit has 25 damage, it shouldn't drop to 0 just from one hit.

Zarkussell
Posts: 38
Joined: December 31st, 2015, 3:00 am

Re: Legend of the Invincibles

Post by Zarkussell » February 25th, 2016, 8:58 pm

Oh okay, that makes sense.

But even just killing too many units triggers additional upgrade paths which is what has been the problem in the past. It has something to do with binding the souls of the defeated units I believe. On that menu could you add a no-upgrade type choice that would prevent any additional options from popping up?

Post Reply