Problems when using requirements

Posts

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Problems when using requirements

Postby snowblizz at 21 Jan 2012, 00:15

Finally played around with requirements. When I at last understood where they were going and how to get them to show.

Since it's 2am I'll quickly jot down some stuff. Validations aren't properly cleared out. If I close an army with validation errors they remain behind.
When ever validation occurs it shows for all instances. Maybe that's a known thing. Eg. if I put a Empire4 needs two Empire3 (Gunnery heavy and special) and Empire1 requires Empire9 (General and minion) the validation errors will show up both, so EMpire1 will warn that there is an error with Gunnery Specials and Heavies. Also if you select the gunnery special it will have an error telling you you need it for the heavy unit. (This may actually be a feature and not an error, it could be considered pertinent information). I think the issues tie together though. The validation triggers before the unit is added, which makes the dialogue (text) somewhat illogical at times. Eg "You need X for Y" but I haven't added Y yet...

Also can't see any reactions for "RequiresNUnitsForMUnits" on even the most basic examples you have in the #350 thread. Nor can I see anything from "RequiresNoMoreThanNOfUnitType". The third one that I can see in the code. Either it's syntax or something but I can't see the reacting at all.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: How would you want to add contained units?

Postby IBBoard at 21 Jan 2012, 09:54

Thanks for testing the requirements :) I'll break this post out into its own thread, as requirements is a separate topic from contained units.

Validations not clearing out is a simple thing, but thanks for spotting it (ticket 384).

I had planned to write a more complete example army that contains examples of all of the units, so I'll look into RequiresNUnitsForMUnits and RequiresNoMoreThanNOfUnitType as well. It could be an ID thing.

The "showing all issues" thing is probably a bad set of "is it relevant" checks. If you've added an Empire4 but not an Empire3 (so your army is invalid) and then added an Empire1 before an Empire9 then the Empire4/3 requirement is "relevant" in terms of the whole army, but it isn't relevant in terms of the current action. If you had added the required Empire3 or not added the Empire4 then you should only have got the Empire1/9 error. (Ticket 385)

If you can give me an example of the illogical text then it might help me work out what is going on there. In the case of the Empire4/3 requirement then if you add Empire4 first, I'd expect it to warn you that you shouldn't do it because you don't have any Empire3 and so adding an Empire4 would give you 1 x Empire4 for 0 x Empire3 when it expects 1 for 2. If you added the two Empire3 first then you wouldn't get a warning, since the army was valid at all points.

Hopefully that makes sense.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 21 Jan 2012, 15:27

Well, for the "illogical" part.
When using the sample file and picking a General just selecting him will create a validation error. "Army contains Empire General and so must contain: 1 ?? Minion ( would have 0)". Except I haven't actually added him yet. It's a potential validation error. I'm not suggesting it isn't a good idea to warn before adding, I think that's good thing. It's just a wording problem. Army does not contain one yet, I'm still just thinking of adding him. It also says it containS but then talks about "would" mixing both present and future tenses. The grammar kinda throws one off. Not a major issue, just being a grammar n...
Not sure what the "??" are about either.

So a pic of how it looks.
Image
When selecting a unit that isn't validated it shows the validation "error". Not sure what to call it. In part it's relevant information, if I add this it allows something else. On the other hand the message is incorrect, I haven't added the one unit yet.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 21 Jan 2012, 19:35

Odd - it must be picking the wrong text up from somewhere. We have two text strings - one for "what would happen if I added it" checks and one for "you've added it but it isn't valid". I thought it returned the right ones - it does for limiting it to just one General, but that's a different requirement.

The "??" is something in Windows being inferior, or something in the languages messing things up. I used a proper UTF8 multiplication sign for "1 x unit" (rather than the "X" I used there) but it may be that Windows can't handle it. I'll double-check, because I'm sure my Windows build works fine under XP.

Ticket 384 from my last post is fixed already and should be in the nightly (assuming the build service completes successfully!). The showing of all validation issues (Ticket 385) will take a bit more examination, but I'll do it soon. We've now also got Ticket 389 for the pre-add validation messages.

Now, off to update that data file so we've got a common example that uses everything.


[edit] Or not. I've hit this bug so I'll have to fix it first.

The lack of "N for M" requirements should be fixed in the next nightly - I have a "Hacks" class that registers classes with other class in a hard-coded way before we have a proper extension system that can do it automatically. The problem was that I hadn't added that one factory to the hacks class.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 25 Jan 2012, 20:39

I've fixed ticket 352 now (issues with cyclic references in data files) and the nightly should have the new data file in. I'm now looking at Ticket 379 to fix the design flaws giving us bad messages.

I've also checked the UI. The Windows-built apps are fine - the multiply symbol shows up properly. That is on a Windows-built version, though. Perhaps there is a minor incompatibility between Linux-built builds and Windows (like Linux builds a perfectly sensible UTF-8 text encoding and Windows chokes on it).
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 27 Jan 2012, 21:30

Heeey.. looking good now.
Still get the ?? thing though. With Nightlies.
However if I do a compile via .Hg/VS then it shows it correctly. Must be some Linux->win thingy.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 28 Jan 2012, 15:27

If your local build and my local build in Windows are okay then it must be the Mono/Linux build. I'll see what I can work out and whether I can fix it. Hopefully I'll be able to get bug 352 fixed this weekend to reduce the unnecessary warnings, but I've had a cold that has turned into a bad throat, so I've not done as much today as I normally would have.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 29 Jan 2012, 22:12

Playing around with requirements, I came to think of one. And of course I can not find the thread where you listed them.
Same as NforM units but on category. Example was in Battlfleet Gothic you can take 1 Battleship for every 3 cruisers, 1 grand cruiser for every 3 cruisers and 1 heavy cruiser for every 2 cruiser. So 2 cruisers allows me to take 1 heavy cruisers which would open up 1 grand cruiser and 1 battleship (I think it works the same as for a grand cruiser).
Technically I can do it on a per unit basis (the basic list is fairly short). But I think it wouldn't stop me from picking 1 each of the two types of battelships available (in the basic list). It would also be more of a chore with the expanded fleets lists with more ship variants.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 30 Jan 2012, 20:23

There's this old post, which is nearly a year old now. That was probably it (plus we have tickets for most bits).

I'm trying to think how best to do the type of requirement you're mentioning. It is almost the inverse of the NforM requirement. Rather than saying "you can take N of me for every M of some other unit(s)" you're saying "for every M of me you can take N of some other units". Despite not seeming too dissimilar, I think that way might be easier to check. The hard part at the moment would be the constraint being on the "category". I'd have to look into BFG and give it some thought.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 19 Mar 2012, 19:33

I've not really thought about this use case yet, but we do have the core requirements in place. Hopefully it should be a comparatively easy thing to add on top of the current classes without too much extra work, after the restructuring I just did.

If you can check out the latest builds and see how they're doing then I'll add this to a ticket and see what we can get done for it :)
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 21 Mar 2012, 15:46

I'll have to have a look. I've been thinking about doing WF stuff, but it's paper season (deadline, get a negative response, have to tool for next deadline a week away which turns into 2 weeks away so must out more time into improving etc etc etc) for me until Friday so I've been feeling rather occupied. Even though technically most evenings have been free. Got some Skaven painted though...
I was hoping that by the time I felt up to testing there'd be lots of lovely new requirements. :) But didn't want to push when I wasn't free myself.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 23 Mar 2012, 19:21

I've had a mad time at work - frantic building of kit to deliver to research partners, then introducing them to it, then preparing for their demos, then supporting their demos. That plus a cold that didn't want to shift mean I've not done as much as I'd hoped :( It'd be good if we could find a few more people who could spare the time to code more, but I guess most people don't see an army roster building application as a priority, even if it is free and non-evil!
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 24 Mar 2012, 14:30

I think there's still something funky in the validations.
From the samplesystem
<requirements>
<!-- Allow 2 of this unit for every 4 swordsmen and spearmen units (combined) -->
<requirement requirementName="RequiresNUnitsForMUnits">
<data>Empire2;Empire6:4;2</data>
</requirement>

But if I have 4 spearmen, 4 swordsmen and 2 gunnery heavys I still get a validation error. with only 1 gunnery heavy it's ok. Remove one spear/swordman and it triggers.
Basically it seems I need 4 of both for each 1?

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Problems when using requirements

Postby IBBoard at 24 Mar 2012, 19:17

I might have encountered that one today and fixed it :) I'll try to finish what I'm doing and roll out a new snapshot tonight.

[edit] Okay, the fix should be in and because of this ticket then the last bits of flexibility on the core requirements should work too. I believe we now have parity with Rollcall's "N,list", "-1,list" and "-2,list" plus the added ability for "-1" and "-2" to be "unlimited after X" and "no more than X" for arbitrary X rather than just for 1.

I've kicked off a build manually, since the nightly snapshots have been hanging recently. Hopefully it fixes your problems :)
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Problems when using requirements

Postby snowblizz at 29 Mar 2012, 08:43

OK so that particular issue seems to be resolved in #39, now of course instead if I only add 1 unit of gunnery heavies then it won't validate it as an error. Basically it has cut the requirement in half.
Allowing 2 A for every 4 X+Y seems to translate into allowing 1 A for every 2 X+Y. And that's now correct right? It should still require 4 X+Y before even one P is added.

Next