This site is in archival mode. A replacement is being developed. In the meantime, please use the PBW2 Forums for community discussions. The replacement software for this site will use a unified account system with PBW2, and any newly created threads will carry over.
Welcome to Spaceempires.net
Login or Register

Search
Modules
· Content
· Downloads
· Forums
· Game Info
· Image Gallery
· Links
· Shipyards
· Topics
· Staff

User Info
· Welcome, Anonymous
Membership:
· New: Astorre
· New Today: 0
· New Yesterday: 0
· Overall: 3155

People Online:
· Visitors: 76
· Members: 0
· Total: 76

  

Spaceempires.net :: Dvoongar's Barrage of Questions :: View topic
Forum FAQ :: Search :: Memberlist :: Usergroups :: Profile :: Log in to check your private messages :: Log in


Dvoongar's Barrage of Questions
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion
View previous topic :: View next topic  
Author Message
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Mon Mar 31, 2014 2:19 pm    Post subject: Reply with quote

"cannot recognize section ," might mean there's an EXTRA comma.

And yeah... it's wonky but SOME number fields accept formulas and some don't. It seems to be largely arbitrary.


Back to top
Skyburn
Space Emperor


Joined: Mar 12, 2008

PostPosted: Mon Mar 31, 2014 3:28 pm    Post subject: Reply with quote

[quote="Zwo_Dvoongar"]
Zwo_Dvoongar wrote:

This raises questions about the ECM entries on seekers being applied; it could be the case that seekers aren't getting any defense bonus at all.

If it's an entry on the component using Get_Empire_Tech_Level, then I think you're often right. I ran into the same problems with Adaptation Tech in my mod. The abilities appeared to be applied to existing designs, but once you got into combat it was easy to see that they were not.

The workaround is to make a new design every time you improve the ECM tech. You can't use the Upgrade or Copy buttons either, it has to be a new design. I think refitting existing designs to the new design will work, but there has to be some change or the game will tell you you can't refit to an identical design. The AI might not be able to handle this workaround without substantial changes, though at this point you'd probably know better than I.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 03, 2014 1:47 am    Post subject: Reply with quote

Okay, I finally have a playable enough game to test, and I've started.

I have discovered something which may benefit other modders.

Just as you'd expect, this works:
Code:

Requirements Evaluation Availability            := 1, 2, 3
Requirements Evaluation Allows Placement        := 4, 5, 6
Requirements Evaluation Allows Usage            := TRUE


This does not:
Code:

Requirements Evaluation Availability            := 1, 2, 6
Requirements Evaluation Allows Placement        := 3, 4, 5
Requirements Evaluation Allows Usage            := TRUE


I had added a sixth requirement for fighters, and just tacked it onto the end. It applies to availability, so that's where I listed it. I wasted considerable time going over the restrictions when fighters refused to show up in the game. It was admitting I had the tech, and granting fighter bays.

Anyhow, when I guessed that the game might be picky about the order, I got them back up and running.

I had to move the sixth requirement up into the third slot, and renumber the others.

--------------------

As of now, I'm leaving a bug in the game. I couldn't even post about it yesterday, lest I should have been taken for a fool or someone trying to make a fool of others. If I didn't see this bug, I would have thought it impossible.

Beam 4 is invisible, and Bolt 16 is showing up as Torp 4. There were other weapons doing similar things. On about 1/4 of the weapons I added, the game is using the wrong effect, or none at all. I checked my listings over and over and over again, and I switched some over to things that work.

Unless I change my mind, I won't be repairing those that remain, until I patch the mod. I want others to see this. It makes absolutely no sense. I cannot even imagine a way for it to be happening.

I even tested to see if my install had gone bad. It's not that either. This bug defies what I know about the workings of computers and software. There is no garbage going in, but garbage comes out.

I expect eventually I'll have to replace those entries which aren't working with entries known to work. This will result in some duplication - I won't have individual looks for the different weapons. Since it's all in Components.txt, the update won't be too big, or difficult to install.

This is Twilight Zone stuff here. It's baffling and frustrating. There is no pattern, no rhyme or reason.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 03, 2014 2:41 am    Post subject: Reply with quote

Skyburn wrote:
Zwo_Dvoongar wrote:

This raises questions about the ECM entries on seekers being applied; it could be the case that seekers aren't getting any defense bonus at all.

If it's an entry on the component using Get_Empire_Tech_Level, then I think you're often right. I ran into the same problems with Adaptation Tech in my mod. The abilities appeared to be applied to existing designs, but once you got into combat it was easy to see that they were not.

The workaround is to make a new design every time you improve the ECM tech. You can't use the Upgrade or Copy buttons either, it has to be a new design. I think refitting existing designs to the new design will work, but there has to be some change or the game will tell you you can't refit to an identical design. The AI might not be able to handle this workaround without substantial changes, though at this point you'd probably know better than I.

Things are messy and inconsistent there. I think the way to fix it would be to have the main game calculate the values for ships - all of them - and then pass them to the combat engine. ...Not that we'll see it happening.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 03, 2014 5:24 pm    Post subject: Reply with quote

I was afraid I wasn't done. Whole mess of this type stuff in there too:
Code:
Weapon Seeker Speed Formula                     := 0.038 + (0.006 * Max(0, [%Level%] - 6))


Surprisingly, the seekers were moving. I'm not taking chances - it's all getting yanked.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Thu Apr 03, 2014 6:03 pm    Post subject: Reply with quote

well... your formula starts with a number. Maybe the game ignores everything after that?

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Apr 07, 2014 4:24 am    Post subject: Reply with quote

I tested the idea of using the "Sight Obscuration" ability on ships. It will apply, but the scope cannot be restricted to the "Space Object". Everything in the hex gets hidden.

Even a Phong colony got cloaked! The world showed as empty. I was really surprised the game interpreted things that way.

Anyhow, passive cloak remains unavailable.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Apr 07, 2014 4:42 am    Post subject: Reply with quote

In other news, I'm looking at another great mystery.

I think I'd be ready, or nearly ready at least, to commence the final phase, writing my six special AIs, if not for a problem in the scripts.

The AIs are not designing Colony Ships, and I cannot discover how come. In early testing, they colonized just fine, but now they've stopped. They started out behaving properly, then some of them began designing and building colony bases, and now they've quit altogether. Even when I log in and provide them with designs, the designs just disappear. I'm frustrated. The listing in Components.txt doesn't even allow for the colony modules to be installed on bases.

If I can't properly solve this, I think I can write in a simple alternative that will force them to use the Colony Ship hull; that's not really the proper way to fix things.

Things changed bigtime when I fixed the problem with my fighter listing. I suspect the problem may not even be in the scripts, but is rather in Components.txt or VehicleSizes.txt. I think maybe something's not being read right, and there's a chain reaction, or domino effect. When I fixed the fighter listing, and re-commenced play, I had to abandon the game because all weapon platforms were transformed into troops, and all troops were transformed into mines. Maybe the colony bases were a result of some transformation too...


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Wed Apr 09, 2014 12:24 am    Post subject: Reply with quote

Well, try doing a brand new game and seeing what happens.

But, it might be a flaw in how the AI decides what designs it needs. If something else has to high a priority it'll build that thing obsessively.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 10, 2014 12:00 am    Post subject: Reply with quote

marhawkman wrote:
Well, try doing a brand new game and seeing what happens.

But, it might be a flaw in how the AI decides what designs it needs. If something else has to high a priority it'll build that thing obsessively.

Thanks.

I tried both. I've ruled out the priority business. They'll build if they have a design - they just refuse to make the designs.

I've been over and over that stretch of code, and I'm about to just bypass it and force them to design, whether they want to or not. I don't like doing that, but the game's not giving me any other option.

It's so strange: before I fixed the fighters, they were designing and colonizing. After I fixed that bug in the vehicles, they quit.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Apr 11, 2014 8:38 am    Post subject: Reply with quote

I'm not giving up. Here's my take on the situation:

Known:
Demand isn't an issue - AI will construct if it has a design. Also, normal "demand" rates only apply to placing orders; AI will still design even when it isn't going to build a vehicle.
Design part itself is working - Autocomplete isn't having problems; I fixed one, and it was rare. Now over 20 consecutive successes. Even if spotty, it wouldn't stop 100%, and it isn't spotty.

Left to eliminate:
Maybe wrong hull or no hull being chosen.
Maybe a problem with "wanted designs" list, or somehow skipping first entry on the list.
Maybe rejection during "is design wanted", which pares down the list. Some time back, I made changes there to reduce the frequency.
Maybe somehow not knowing it has the modules, so not adding colony ships to list.

Anyone see anything I might be missing?

I plan to short-circuit the elements which might be flawed, one-by-one. For example, I'll skip the "is design wanted" part, and see what happens in a few turns. I might have to make the AI use only Colony Ship hulls in one experiment. Stuff like that. When I get the AI to design, I should then have the problem isolated.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Fri Apr 11, 2014 2:59 pm    Post subject: Reply with quote

Double check the design types. I know it doesn't SOUND like an issue, but the AI files have a list of design types and everything must match one of those.

Anyways, every empire should have colony ship designs. It's illogical to not have them. Not BUILDING them is understandable if you have no good targets to colonize. But there should always be a design ready to be built... preferably one for each colonization type.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Apr 11, 2014 6:32 pm    Post subject: Reply with quote

Yes, I have about gone crazy with all the different "types" involved. There's one set of "type" that's just ship, unit, base; then another "type" for the hulls; then still another for the role of the ship.

When I discovered Kwok had changed the AI_VEHICLE_SIZE stuff from strings to numbers, I thought I was onto something. It turned out a bust, but at least I learned a little more about what's going on.

I have tried bypassing the checks to see if the colony modules are available, and forcing Is_AI_Design_Type_Needed to return true. No difference. It's like I can't even force the fool thing to design a colonizer.

Here's what's left, best I can figure:
Code:
    if (design_type_count > 0) then
      call Sys_Prepare_For_Vehicle_Design_Creation(sys_long_Player_ID)
      for index := 1 to design_type_count do
        set ai_design_type := lst_design_type_to_create.get(index)
        set ai_design_index := lst_design_type_index.get(index)
        set gbl_design_name := lst_design_type_name.get(index)
        set gbl_design_size := lst_design_type_size.get(index)
        call Create_Design(ai_design_type, ai_design_index)
      endfor
    endif


That call there is for the same code the autodesign uses, so the problem shouldn't be there. But most everything before that is just list stuff, and I don't mess with list variables since I don't understand them. That's not anything I would've changed.

I'm wondering if somehow it's switching hulls on me. All the player chooses ahead of autodesign is the hull and then what kind of vehicle to build. I think the next try is to force every design to use the Colony Ship hull, no matter what. The only thing that can come out legal then would be colony ships.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Fri Apr 11, 2014 9:40 pm    Post subject: Reply with quote

I wish I knew. I have little experience with AI modding. Sad

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Apr 14, 2014 3:37 pm    Post subject: Reply with quote

Well, I've been unable to find any problems in the AI. There is news, however. It turns out things work in max tech games. The AI designs and colonizes like mad.

It's a difficult mystery now!

I suspect the problem is elsewhere, and not in the AI. Something in the mod is throwing a few other things off, particularly the visual effects for weapon fire. I begin to wonder if a mod can simply be too big.

The best way I can think of to test is to re-mix things a little. Supersize* mod worked pretty well. I could take those AIs and see whether or not they can colonize in the present version (I call it "Prequel Mod"). Alternatively, I could try the present AIs on Supersize, and see what happens.

If the older AIs can't colonize either in a normal start game, I think it would mean the problem is somewhere in the underlying mod, rather than in the AI. Same deal if the present AI can function in Supersize. Does that sound about right?

*Supersize is the name of the project's results back in November. It was working nicely, and gives an interesting game. Dozens of changes have been made since then, adding more hulls, techs, weapons, components, etc.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Mon Apr 14, 2014 6:58 pm    Post subject: Reply with quote

Hmm... this is peculiar. I have no idea what to say here... Hmm... what about a version of the mod with a bunch of techs removed? does that work?

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Tue Apr 15, 2014 12:18 am    Post subject: Reply with quote

marhawkman wrote:
Hmm... this is peculiar. I have no idea what to say here... Hmm... what about a version of the mod with a bunch of techs removed? does that work?


Well, that was to be my next test, if needed. I just finished testing the opposite: I ran the new mod with the old AIs, which aren't scripted for all the new stuff. I have tested the older AIs with the new mod, and they work!

Now I know the problem is in the AI changes, the scripts - not the rest of the mod.

The trick here is going to be organizing things. I'll use WinMerge. Instead of going change by change, and testing each one, I plan to do batches of roughly half, and thereby narrow things down and isolate the problem. I'll work on the principle of finding a number between one and one hundred by determining if it's higher than 50, and then if it's higher than the next halfway increment.

The organizing is critical, since I'll have so many close copies of the same files in play, and my short-term memory is relatively poor. If I do this right, it shouldn't take more than 7 or 8 more tests to isolate the problem. Once I know where it is, I have a fighting chance.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 17, 2014 2:02 am    Post subject: Reply with quote

Well, I wasn't quite able to follow the procedure I described. There are issues of inter-connectivity among functions, so you can't just cut things in half.

Still, I've been working with large chunks. I eliminated all the other script pieces within the first two tests, and determined that the problem's in my new DesignCreation. I'm six tests in now, and making good progress.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 17, 2014 3:55 pm    Post subject: Reply with quote

Okay, I've got it narrowed down. The problem is somewhere in the designs being produced. I didn't think that was possible, since the auto-design works properly.

It'll probably take some time to sort out, since I not only made changes to the choices of components, but also re-ordered them.

WinMerge has made this whole procedure possible; without it, I doubt I could've managed this much in a month.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Apr 17, 2014 9:51 pm    Post subject: Reply with quote

The function Add_Required_Components_To_Design is called from two separate places, so it appears the design process for auto-complete differs slightly from the process for independent AIs.

I'm pretty confident I know the problem now: the AIs were adding too many engines to their colony ships. That explains how come at max tech they wouldn't have a problem - the highest level colony ships can take the full amount, while lower levels are restricted.

There's a little left to sort out yet. I re-arranged the order of installation, trying to get the most important stuff in for sure without putting it first. I already knew I messed up when I did that, but I thought I had fixed the problems satisfactorily. The mistakes involved getting the right depth of nesting on some of the if then's and else's. Initially, shields weren't being installed at all. When I fixed that, I thought I got things right, but maybe not.

Anyhow, engines got moved, and that introduced another problem I hadn't accounted for: some components have propulsion values, so the number of engines must be adjusted. If the engines go in early, it's okay to base the adjustment on flags, but if they go in late, it needs to be based on what's installed (some of the flags get set to "false" upon installation). So I re-wrote those to work both ways. That way, later on I can tinker with moving things around, now that I know to be careful.

I really had my doubts, but it looks like this problem will soon be handled, and the project can move forward.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Sat Apr 19, 2014 1:53 am    Post subject: Reply with quote

Cool! I'll have to remember that. But yeah, this is one of those situations where I'd have it place comps in the order: essential innards(bridge etc...), colony module, engines, then other stuff.

It reminds me of a mystery that I have yet to solve. The Warp 10 AI will use armor mounts, but only when it's trying to fill up leftover space with armor. I never added any AI coding to tell the AI to use ANY of the new mounts I've added to the game. For reference the list is: 5 weapon mounts {Efficiency, cost, damage, megascale, warhead}, miniaturization mount, and stellar manipulation mount.

I'm currently planning to add a mount for "reinforced". It would be used to increase the HP of internal system with only a minor cost increase. Not sure how useful it'll be but it'd be a racial advantage. It'd be something costed so that using it is an advantage despite having a cost.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Sat Apr 19, 2014 3:14 pm    Post subject: Reply with quote

marhawkman wrote:
Cool! I'll have to remember that. But yeah, this is one of those situations where I'd have it place comps in the order: essential innards(bridge etc...), colony module, engines, then other stuff.


Okay, there's a little more to it...

Balance Mod scripts calculate and install engines BEFORE flags go on. If you need to change the number of engines based on other components, engine installation needs to be moved back.

Drove me crazy, trying to figure out what was wrong with my subtraction code - then I remembered I had similar issues when I moved shield installation up to the very front - there were no amounts yet, so no shields got installed.

Quote:
It reminds me of a mystery that I have yet to solve. The Warp 10 AI will use armor mounts, but only when it's trying to fill up leftover space with armor. I never added any AI coding to tell the AI to use ANY of the new mounts I've added to the game. For reference the list is: 5 weapon mounts {Efficiency, cost, damage, megascale, warhead}, miniaturization mount, and stellar manipulation mount.

Well, there are two places armor gets installed. You probably know that. Beyond that, I don't have any clues to offer. I just checked and both use the direct "call Add_Components_To_Vehicle_Design(design_id, comp_id, comp_enh_id, SHIP_SECTION_ARMOR, 1, FALSE)" rather than that indirect "call lst_AI_Extra_Comp_Name.add" method. One would sure expect identical outcomes both times.

Quote:

I'm currently planning to add a mount for "reinforced". It would be used to increase the HP of internal system with only a minor cost increase. Not sure how useful it'll be but it'd be a racial advantage. It'd be something costed so that using it is an advantage despite having a cost.

Say, you know what's a cool alternative to increasing HP? "Component -Damage Resistance". I discovered it late, so I'm not using it much. I'm afraid of throwing balance off, if I put serious numbers in there, and the smaller values are hardly worth the trouble.

Here's what's up now:
My Tenth test game is too much fun. There are still a few small odds-and-ends to transfer over. WinMerge helps find them, but it's a chore. Meanwhile, the test game has everything (important) clicking. The AIs are designing colonizers and other ships properly, with and without alternative propulsion components in the mix. I'm having too much fun to quit and get after the work.

When I get back to work, Test Eleven should just be a formality. Most of the changes remaining are trivial tweaks. If any of them act unruly for some reason, they aren't needed anyhow.

I also though of a cool work-around for my custom scripts. I was going to give each one of them its own folder and unique set. They have several things of their own, and the clutter could get pretty bad.

The drawback is that any subsequent AI improvements would have to be done over and over and over for each one of them.

Anyhow... I figured out how to deal with things a better way: I'll put all the custom changes in special functions in GlobalSettings! That way only one file differs in the folders. The calls for the functions will go in the same shared, common scripts, and I'll just have to set those up carefully so they don't apply when they shouldn't.

Of course I could designate 'most any file for the special functions. A promising alternative would be the AI "main" files, which are already distinct. I haven't decided for sure. If I can organize things well, subsequent changes will be far, far easier. I intend to think on it a few days.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Sun Apr 20, 2014 3:47 am    Post subject: Reply with quote

Quote:
Well, there are two places armor gets installed. You probably know that.
Nope. Razz Sadly the only AI work I've done was tweaking colonization.
Quote:
Say, you know what's a cool alternative to increasing HP? "Component -Damage Resistance". I discovered it late, so I'm not using it much. I'm afraid of throwing balance off, if I put serious numbers in there, and the smaller values are hardly worth the trouble.
That works on MOUNTS? O_O'

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Wed Apr 23, 2014 6:49 am    Post subject: Reply with quote

Things look promising as I begin preparations for the final test in this series. None of the changes appear threatening. I'm even adding AI support for a couple of tweaks I made to the mod.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Wed Apr 23, 2014 7:02 am    Post subject: Reply with quote

marhawkman wrote:
Quote:
Say, you know what's a cool alternative to increasing HP? "Component -Damage Resistance". I discovered it late, so I'm not using it much. I'm afraid of throwing balance off, if I put serious numbers in there, and the smaller values are hardly worth the trouble.
That works on MOUNTS? O_O'


Um... I didn't intend to say that, but I'm guessing it would. I just meant to mention the ability.

I don't do much with mounts. I suppose I could learn them easy enough, but they weren't in the plans for the mod, and I need to get this thing finished.

One thing I did was use an AI Tag on some weapons to prevent them from being mounted. That worked just fine. It was easy, and I was surprised the first attempt nailed it.

I suppose at some point I might review what's been done with mounts, and consider filling in sparse areas of the tech tree with one or two. It might be fun to play with putting propulsion on a mount, and seeing how that works out.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Spaceempires.net Forum Index -> SEV Modding Discussion All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
All logos and trademarks used on this site, all comments and stories posted for reading, all files hosted for download,
and all art work hosted for viewing are property of their respective owners; all the rest copyright 2003-2010 Nolan Kelly.
Syndicate news: SpaceEmpires.net News RSS Feed - Syndicate forums: SpaceEmpires.net Forums RSS Feed
Page Generation: 0.18 Seconds