Search found 1647 matches

by Pi-C
Wed Sep 18, 2019 6:45 am
Forum: Modding help
Topic: Constructing localized strings in game
Replies: 4
Views: 697

Constructing localized strings in game

I've another localization problem. :-) Suppose you have these strings defined: [strings] list=You get __1__ as result. AND=and That's easy to use if you only want to show one value: local a = "an iron gear" game.print({"", "strings.list", a}) But how about a list compos...
by Pi-C
Tue Sep 17, 2019 3:12 pm
Forum: Resolved Requests
Topic: Error in description of set_driver(driver)?
Replies: 4
Views: 1827

Re: Error in description of set_driver(driver)?

Yes, I should have figured that one out myself. Guess I've been confused by my own expectations (thinking of a cab, where one driver can haul around as many passengers as fit into the vehicle).
by Pi-C
Tue Sep 17, 2019 2:53 pm
Forum: Resolved Requests
Topic: Error in description of set_driver(driver)?
Replies: 4
Views: 1827

Re: Error in description of set_driver(driver)?

Yep, fixed for next version. Thank you! Another thing: What is the upper limit for passengers? If there's really only one passenger per vehicle allowed, it would be nice if you could clearly state that under get_passenger() and set_passenger(). (Then again, could it be useful if more passengers wer...
by Pi-C
Tue Sep 17, 2019 1:46 pm
Forum: Resolved Requests
Topic: Error in description of set_driver(driver)?
Replies: 4
Views: 1827

Error in description of set_driver(driver)?

Not sure if this is the correct forum, but I find this description of set_driver() confusing: set_driver(driver) Sets the driver of this vehicle. Parameters driver :: LuaEntity or LuaPlayer: The new passenger or nil to eject the current driver if any. Note: This differs over LuaEntity::set_passenger...
by Pi-C
Sun Sep 15, 2019 7:25 pm
Forum: Modding help
Topic: Player getting stuck in deep water
Replies: 43
Views: 5289

Re: Player getting stuck in deep water

how about simply calling is_chunk_generated() onto the target position and if it's not generated silently fail. Makes sense! (Might fail with a message, though.) Would it make sense to do the same thing for surfaces? I.e., if the vehicle is on another surface than the player, let the action fail as...
by Pi-C
Sun Sep 15, 2019 6:27 pm
Forum: Modding help
Topic: Player getting stuck in deep water
Replies: 43
Views: 5289

Re: Player getting stuck in deep water

Still means that the player chose the location. Which makes it impossible to enforce summoning to exactly the same chunk The vehicle sits somewhere -- that chunk must be charted. The player location definitely is in a charted chunk. Without long reach, the new position must be either in the same ch...
by Pi-C
Sun Sep 15, 2019 5:23 pm
Forum: Modding help
Topic: Player getting stuck in deep water
Replies: 43
Views: 5289

Re: Player getting stuck in deep water

1) if you teleport into a map chunk that isn't generated yet bad things happen Normally, you teleport the vehicle to a place next to the player character, where "next to" means it is within the character's reach Does that mean the player can chose the exact position? Bad phrasing, perhaps...
by Pi-C
Sun Sep 15, 2019 3:54 pm
Forum: Modding help
Topic: Player getting stuck in deep water
Replies: 43
Views: 5289

Re: Player getting stuck in deep water

Sorry for taking so long to reply! I noticed 2 problems with teleporting so far: 1) if you teleport into a map chunk that isn't generated yet bad things happen Generate the chunk first and force generation of the outstanding chunks even if that makes the game pause for a second. I don't force genera...
by Pi-C
Fri Sep 13, 2019 4:32 pm
Forum: Implemented mod requests
Topic: A solution to searching prototypes in natural language
Replies: 23
Views: 5524

Re: A solution to searching prototypes in natural language

The idea is to add an additional field to the prototypes, named search_strings or something, that contains the words the developer wants to let people find their item as. So, for an item with the name 'gear', and the localised name 'Iron gear', you could have search_strings like 'Iron', 'Gear', 'Ei...
by Pi-C
Fri Sep 13, 2019 2:14 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

An error in json parsing usually leads to the mod being completely ignored as if it didn't exist. And if there's an error message it's buried in the log file. Oh, damn, you're right of course! The game doesn't crash, but the mod isn't loaded -- alas, there is a clear error message in the log file! ...
by Pi-C
Fri Sep 13, 2019 1:17 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

Eh...that's about it. Looks great. Maybe a sentence about valid JSON requiring that there is *no* comma after the last entry in an array (or is that just me constantly falling for that every time i update the dependencies?). Nope, that usually happens to me as well. But an error in info.json result...
by Pi-C
Fri Sep 13, 2019 1:04 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

Bilka wrote:
Thu Sep 12, 2019 8:26 pm
Consider the info.json documentation done: https://wiki.factorio.com/Tutorial:Mod_ ... #info.json :)
Thank you, this looks quite helpful! :-)
by Pi-C
Wed Sep 11, 2019 2:43 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

OK, got that now. Except, I don't see a use case for that, based on my personal experience. Again, just describing how it works now. Though "i don't need it" is very weak reason to argue against anything :p. I didn't want to argue against that, I said that -- based on my personal experien...
by Pi-C
Wed Sep 11, 2019 1:35 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

However, the name of the top directory inside a zip-file really doesn't matter! And that is all i said. Sorry if it wasn't clear. OK, got that now. Except, I don't see a use case for that, based on my personal experience. When I make a mod, I create a new directory with the correct name and version...
by Pi-C
Wed Sep 11, 2019 12:08 pm
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

The "top directory" can be any name, it doesn't affect anything. Really? How about if you have the mod installed not as a zip-file, but as an unpacked directory? (That should only be relevant if you're working on that mod locally.) I seem to remember that the game wouldn't load in this ca...
by Pi-C
Wed Sep 11, 2019 11:59 am
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

I think it would be a good idea to put up some more information on the Wiki: What characters are not allowed in "name"? What is the correct syntax for dependencies (not just "modname", but also "? modname", "(?) modname", and "! modname")? On my tod...
by Pi-C
Wed Sep 11, 2019 11:21 am
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

The "top directory" can be any name, it doesn't affect anything. Really? How about if you have the mod installed not as a zip-file, but as an unpacked directory? (That should only be relevant if you're working on that mod locally.) I seem to remember that the game wouldn't load in this ca...
by Pi-C
Wed Sep 11, 2019 11:11 am
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

Re: info.json handled differently by game and modportal

I wonder how much CPU it would cost "the portal" to actually try and start a new map with just the new mod + dependencies on a headless server every time a new version is uploaded. And notify the author when there's an error during that. But then again i'm against "pseudo intelligent...
by Pi-C
Wed Sep 11, 2019 10:21 am
Forum: Modding discussion
Topic: info.json handled differently by game and modportal
Replies: 23
Views: 3886

info.json handled differently by game and modportal

When I tried to upload a new mod, it was refused on the modportal because the definition of "name" in info.json contained illegal characters ("+" and "-", not just alphanumeric characters and the underscore). I quickly fixed that by changing the name to something else, ...
by Pi-C
Tue Sep 10, 2019 12:44 pm
Forum: Modding interface requests
Topic: Predefined strings in localization files
Replies: 6
Views: 1561

Re: Predefined strings in localization files

For example it's possible to references entity/item names: [entity-name] example=Example big_example=Big __ENTITY__example__ Yes, got that one to work. This seems to be a case of a built-in parameter . but not descriptions: [entity-description] example=unsuspicious big_example=really __ENTITY-DESCR...

Go to advanced search