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: 70
· Members: 0
· Total: 70

  

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
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Wed Jan 01, 2014 7:04 pm    Post subject: Reply with quote

One more...

I noticed a "ShipSizes.txt" file in some of the ship sets. Does the game use that, or is it just something held over from making the ships? I've been mixing things up a little, and if I need to alter the ShipSizes files too, it could be a problem.

Not a big deal here; I can test it easily enough, if nobody knows off the top of his head. Just rename the file & fire up a save, right?


Back to top
ekolis
Virtual Guru


Joined: Aug 04, 2003
Location: Cincinnati, OH, USA

PostPosted: Thu Jan 02, 2014 6:40 pm    Post subject: Reply with quote

I have never heard of such a file. Presumably it's not used, or if it is, it's optional. Which shipsets have it? Maybe it's used to unlock some undocumented features? Razz

That's no space station - it's a spreadsheet!


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Jan 03, 2014 6:32 am    Post subject: Reply with quote

Okay, I got over my laziness and tested. Nothing seemed any different without the file, so I'm figuring it's residual. Good thing, too. I had figured out enough of the other files to do what I want to do, but that one had me baffled.

Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Tue Jan 07, 2014 9:00 pm    Post subject: Reply with quote

What's IN the file? might it be a copy of Vehicle sizes?

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Jan 24, 2014 10:17 am    Post subject: Reply with quote

Okay, after doing other stuff for a while, I'm getting back after the AI.

I find things like this listed two places

Code:
  bool_Race_Uses_Crystalline_Tech:                         boolean := FALSE
  bool_Race_Uses_Organic_Tech:                             boolean := FALSE
  bool_Race_Uses_Psychic_Tech:                             boolean := FALSE
  bool_Race_Uses_Temporal_Tech:                            boolean := FALSE


The same entries are in Script_AI_GlobalVariables.txt and also Script_AI_GlobalResearch.txt.

I'm adding my new racial stuff to both, just to be safe, but whichever executes first should suffice, I would think.

Also, if anyone knows which of the script texts are no longer compiled, it would save me some time making redundant entries. I'd like to stuff them in their own folder out of the way.

I expected what I learned before to stick with me better, but I'm getting confused all over again in some places. Still, progress is progress. I have hullwork to do on two civs, and then the rest is pretty much just making the AI work with the mod. The closer I get to the end, the more impatient I grow.


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Wed Jan 29, 2014 5:58 pm    Post subject: Reply with quote

I'm thinking it's telling two different parts of the AI that. I'm not really sure exactly.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Jan 30, 2014 10:23 am    Post subject: Reply with quote

marhawkman wrote:
I'm thinking it's telling two different parts of the AI that. I'm not really sure exactly.


Something...

Don't pay me too much attention if I post stuff that doesn't matter. I'm making progress now, at least. I should begin testing within a week - not the full mod, but what I'm calling "shortchange mod". I'll still need to make 6 custom AI's after that, but ALL the foundation and everything else will be done. I've gotta be around 90% through. Just tackled 2 tricky AI projects, and the rest should be downhill now.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Jan 31, 2014 8:15 am    Post subject: Reply with quote

Okay, I'm at a bit of an impasse with AI_DesignCreation.

I have a component which requires shields to be installed. I would like to install it first, and then install the shields. Will that work, or will the thing spit it out?

If I have to, I could install after shields, but that is less satisfactory. If anyone knows, thanks!


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Tue Feb 04, 2014 5:12 pm    Post subject: Reply with quote

why does it require shields?

Back to top
ekolis
Virtual Guru


Joined: Aug 04, 2003
Location: Cincinnati, OH, USA

PostPosted: Tue Feb 04, 2014 7:58 pm    Post subject: Reply with quote

Maybe he's dummy-proofing shield regenerators? Smile

That's no space station - it's a spreadsheet!


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Wed Feb 05, 2014 12:37 am    Post subject: Reply with quote

marhawkman wrote:
why does it require shields?


Okay, I went with the inferior way, and I'm moving along. The reasons might not be all that great. It's a bit powerful, and I wanted to restrict usage. Then there was the backstory "justification", and that's what fit.

The negative surprises add up sometimes. When modding the components, these are available

Get_Design_Ability_Percentage_Of_Hull_Space
Get_Design_Ability_Component_Count

but when modding the AI there is no equivalent. The only tools are

Sys_Does_Vehicle_Design_Have_Component_With_Name
Sys_Does_Vehicle_Design_Have_Ability_With_Name

and that doesn't give numbers or tell how much hullspace has been devoted.

I just did the best I could, with the tools I had, and the AI won't be operating quite as effectively as it otherwise might. It's going to operate, and that's what counts.

----

Now here's another one I've come up against:
Looking to store variables persistently, so they'll continue turn-to-turn, I came up against lists again.

Quote:
Sys_Set_AI_Storage_Long: boolean
plr_index: long
elem_index: long
list_index: long
new_long: long

This function sets an AI storage long value. AI storage is used by the scripts
to store values that persist from turn to turn. The storage is arranged as an
array of lists. You can use as much storage as you want, but the savegame
file will be that much larger. The plr_index is the ID of the player. The
elem_index is an index into the list storage (only values 1 through 20 are
allowed). The list_index is the index into the specific list. The new_long is the
long value to set. The function returns TRUE if the set was successful.

Once I can test, maybe I'll be able to get that to work. Right now, I'm stuck because I have no idea where and how to declare the list variables mentioned, and I sure don't trust it to be done automatically.

I've gone through all the scripts, and recorded which element & list values are already used, so that won't be an issue.

I need to stick to just bare bones AI anyhow, getting full functionality before going for smarts. Smarts can be included in upgrades. CSF files aren't big, after all.

Hopefully I'll be testing soon. I actually could test now if I were willing to do without some graphics - that's how well things have progressed. Of course, since I've been working for months without any testing, I'll have a few dozen typos to clean up Rolling Eyes

Then when that's done, I'm just 6 custom AIs away from the finish line!


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Wed Feb 05, 2014 3:35 am    Post subject: Reply with quote

Persistent variables aren't easy. I remember that Kwok mentioned this as an obstacle to making BM AIs better. The AI doesn't really have the ability to remember what it did last turn. Thus it never has a long game.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Tue Feb 11, 2014 6:20 am    Post subject: Reply with quote

marhawkman wrote:
Persistent variables aren't easy. I remember that Kwok mentioned this as an obstacle to making BM AIs better. The AI doesn't really have the ability to remember what it did last turn. Thus it never has a long game.


What's annoying is that I only want a few. Seven to ten longs would be more than enough; I have plans for only about three. You can do a whale of a lot with a single long, using it to store a bunch of booleans: just have a test to see of the stored value is evenly divisible by prime numbers. On the "setting" side, just multiply the value by the appropriate prime.

Meanwhile...

I've been paranoid of a phantom. I was afraid mistakes resulting in illegal designs would cause a lock-up; I forgot I already know it won't. Back in like August I had my AIs all putting too many engines on colony ships, and it didn't lock up - they just never built any colony ships. I just remembered that. Now maybe I can work better, without that extra stress.

I spent hours trying to figure out from the code what the thing does with illegal design results. Still have no idea. I wanted to write a failsafe to disregard junk, and maybe try again a couple of times, but I couldn't find where to put it.

Presently, my primary complaint is that there's no way to examine the designs before finalizing, and take things out that might be wrong or excessive. Even removing and re-installing some components deeper would be helpful.

Anyhow, progress is slow and steady, encouraging. I've solved several minor issues in the last few days. A couple of things I expected to be real puzzles turned out easy. The AI that gets the Universal Colony Module will, I'm confident, include it in designs and build them properly now.


Back to top
ekolis
Virtual Guru


Joined: Aug 04, 2003
Location: Cincinnati, OH, USA

PostPosted: Tue Feb 11, 2014 11:39 pm    Post subject: Reply with quote

Zwo_Dvoongar wrote:

What's annoying is that I only want a few. Seven to ten longs would be more than enough; I have plans for only about three. You can do a whale of a lot with a single long, using it to store a bunch of booleans: just have a test to see of the stored value is evenly divisible by prime numbers. On the "setting" side, just multiply the value by the appropriate prime.


Wouldn't bitflags be more efficient? That's the traditional way of representing an array of booleans using an integer...

BTW, in FrEee, AI scripts can store arbitrary data in the AINotes property of the Empire class. Wink


That's no space station - it's a spreadsheet!


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Wed Feb 12, 2014 7:43 pm    Post subject: Reply with quote

Yes, you can squeeze in the most data with bitflags.

...But I don't need that. Easy & short code's what I plan if I get that far.

And when's something new coming out that doesn't require Dot Net for a change?


Back to top
ekolis
Virtual Guru


Joined: Aug 04, 2003
Location: Cincinnati, OH, USA

PostPosted: Wed Feb 12, 2014 9:21 pm    Post subject: Reply with quote

Sorry for being a Microsoft Nazi Sad

That's no space station - it's a spreadsheet!


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Feb 13, 2014 9:10 pm    Post subject: Reply with quote

ekolis wrote:
Sorry for being a Microsoft Nazi Sad

No problem at all.

There are different ways of coding for different purposes. An old friend of mine's a retired mainframe programmer - he could lecture for hours on that.

You can code for speed, for compact files, for clarity, for I-forget-what-all.

I didn't take your suggestion as anything other than a suggestion. I appreciate it, in fact.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Sat Feb 15, 2014 10:10 am    Post subject: Reply with quote

Hmm...

I have been doing a few things with "war tolerance" modifiers, and now I am unable to discover where "war tolerance" actually does anything! Maybe it's something hardcoded, but I see no documentation, beyond the 1.22 patch log


Quote:
18. Fixed - Abilities "Planet Population Assimilation", "Planet Population Environmental Tolerance", "Planet Population Loyalty", "Planet Population War Tolerance" were not working correctly.


I assume if it's doing anything, it's lowering happiness. How, when, and if it actually does might be difficult to investigate.

Is anything known?


Back to top
marhawkman
Space Emperor


Joined: Mar 24, 2008

PostPosted: Sat Feb 15, 2014 10:25 pm    Post subject: Reply with quote

In some occasions, you will see a message about receiving a happiness penalty due to a fleet getting annihilated in one of your systems. Hypothesis: "war tolerance" determines either the severity of the penalty, or increases the losses needed to incur the penalty.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Sun Feb 16, 2014 1:08 am    Post subject: Reply with quote

That's very plausible, from what I can tell.

Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Mar 17, 2014 8:18 am    Post subject: Reply with quote

Progress report:

I'm presently debugging scripts to satisfy the compiler. This batch of scripts, along with the graphics work my friend's promising for components, are all that I need to begin testing the stocker AIs. Once I verify they're functioning satisfactorily, I can use them as the basis for my 6 custom AIs.

All the background stuff for the custom empires is done - hullwork, components, techs - the works. I just need to test what I've got, and make working AIs for the special empires, and version 1.0 will be ready to go. Probably have several more typos and similar mistakes to clean up, but I don't count that chore as much of an obstacle.

Really, the only perplexing part will be getting the AIs to use a sensible mix of the new hulls. I have already got AIs to use one hull I added, so I know I can do that much. How long it'll take to get all the special AIs to use their hulls is the question. I expect it to be tedious.

Still, the end is in sight! Testing means playing, too. That's a bonus.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Fri Mar 21, 2014 9:58 pm    Post subject: Current Hang-up Reply with quote

I've decided to commence testing without waiting for graphics. They aren't essential.

Right now, I'm having a problem getting the game to accept this damage formula
Code:
Weapon Space Min Damage Modifier Formula  := (Max(( 84 * Power(1.173984999426, [%Level%]) - ( Power([%Range%], ( 1.25 + (0.009 * [%Level%])))), (17 + ((10 * [%Level%]) - ([%Range%] / 3.4))))) - iif(([%Range%] > (Min(190, ([%Level%] * 12) + 58)))), 10000, 0)


There's not quite so much going on, if you break it down. It involves choosing the higher amount from two calculations.

Anyhow, the game is claiming it cannot recognize section ",". There are several commas, so that clue isn't helping me zero in. I spent a few hours trying to sort it out, but so far I'm failing.

I have several weapons using this style of formula, and all of them are getting rejected. If I see how to crack one, I should be able to crack the rest.

Lots of progress has been made. I got the scripts to all compile, and cleaned up the techs file to where it gets accepted. I've also cleaned up several mistakes in the components file; I think this damage formula issue is really all that's left, although it's hard to sort through the entire list of errors.

That'll leave the vehicles file, and a few smaller ones. Every typo I've made since November or October is in play, lurking to hold up progress. I didn't invest all this work to be shut down, so I don't think it's bragging to say the smart money's on me.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Mon Mar 24, 2014 9:03 am    Post subject: Finally back in motion Reply with quote

Finally, I've put together a version the game accepts.
Code:
Weapon Space Min Damage Modifier Formula  := Max(Power(1.173984999426, [%Level%]) * 84 - (Power([%Range%], (0.009 * [%Level%]) + 1.25)), ([%Range%] / -3.4) + 17 + (10 * [%Level%])) - iif([%Range%] > Min(190, (([%Level%] - 1) * 12) + 58), 10000, 0)


Now I need to conform about a score of entries that work the same way to the reformulation, and maybe I'll be testing soon.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Tue Mar 25, 2014 3:58 pm    Post subject: Reply with quote

Alright, I doubt if anyone's seen this...

I started up a simple game for testing purposes, and the combat simulator was frozen. I mean the ships, actually. None of them would move, even when I manually gave orders.

I can't imagine how I'd mod such a thing if I tried. The ships had engines, they had movement values in the teens, but they just sat perfectly still.


Back to top
Zwo_Dvoongar
Space Emperor


Joined: Feb 02, 2011

PostPosted: Thu Mar 27, 2014 3:10 am    Post subject: Reply with quote

Zwo_Dvoongar wrote:
Alright, I doubt if anyone's seen this...

I started up a simple game for testing purposes, and the combat simulator was frozen. I mean the ships, actually. None of them would move, even when I manually gave orders.

I can't imagine how I'd mod such a thing if I tried. The ships had engines, they had movement values in the teens, but they just sat perfectly still.


The cause of the problem has been found.

Code:
Space Combat Turn Rate Base                     := 0.00078 + (0.00001 * Get_Empire_Tech_Level("Maneuvering Thrusters"))
Space Combat Turn Rate Decrease Per kT          := 0.0
Space Combat Turn Rate Minimum                  := 0.00073 + (0.00001 * Get_Empire_Tech_Level("Maneuvering Thrusters"))
Space Combat Acceleration Rate Base             := 0.00000052 + (0.00000002 * Get_Empire_Tech_Level("Engine Responsiveness"))
Space Combat Acceleration Rate Decrease Per kT  := 0.0
Space Combat Acceleration Rate Minimum          := 0.00000049 + (0.00000002 * Get_Empire_Tech_Level("Engine Responsiveness"))


Only simple, direct entries are permitted. The combat engine doesn't make calculations there. I tried changing the order of the calculations; I tried using extra parentheses. Nothing I can find helps. A ship with anything more than a simple number is just stuck, unable to accelerate or unable to turn, as the case may be.

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. I'd have to check, and right now I haven't the time to spare. I have to go back and remove all the work I did to implement "Engine Responsiveness" and "Maneuvering Thrusters".

While this is a major setback, and will detract from the enjoyment of my mod, I see no way around it. There is no way to make a placeholder somewhere else and plug it in for the speed and turning values. Hulls are just going to be stuck with one rate throughout the game.

For what it's worth: in previous testing, I was able to achieve nothing by altering deceleration rates. Everything just seems to pretty much stop or slow to its "turning speed" immediately, no matter what. Altering accel & turn rates DOES make a difference, but it is turning out the values must be fixed and permanent for any given hull.

I even had seekers with improving speed, based on levels; they don't fly. More to revert...


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 4 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.69 Seconds