Code: Select all
/c
p = game.player
c = p.surface.create_entity{
name = 'car',
position = p.position,
force = p.force
}
c.set_driver(p)
c.teleport({1e5,1e5})
Code: Select all
/c
p = game.player
c = p.surface.create_entity{
name = 'car',
position = p.position,
force = p.force
}
c.set_driver(p)
c.teleport({1e5,1e5})
My point is thateradicator wrote: ↑Mon Sep 16, 2019 12:51 pmMaybe my toaster is simply too fast. But w/e, checking is_chunk_generated() is trival as i already said. What's your point?
Unless you land in water and drown? What if the passenger leaves the car in the same tick?eradicator wrote: ↑Mon Sep 16, 2019 12:58 pmAnd anyway, as far as i can tell teleporting cars into ungenerated chunks causes no problems whatsoever:Code: Select all
/c p = game.player c = p.surface.create_entity{ name = 'car', position = p.position, force = p.force } c.set_driver(p) c.teleport({1e5,1e5})
There is no "drowning". Both cars and charcters can stand on water just fine, even if they can't move.
Must have missed the part where you said this actually happend and wasn't pure speculation. Have never encoutered it myself either. If you can reproduce "invisible character" you should file a bug.
Yes, if you're talking about the vehicle entity -- but a mod can use set_passenger(nil) and set_driver(nil) to eject anybody who enters a vehicle immediately.mrvn wrote: ↑Mon Sep 16, 2019 12:01 pm1) Vehicles can have passengers.
That was indeed my premise. It's not true anymore, I've spent quite some time on reworking the multiplayer parts of the code (I haven't updated the mod yet, there are still different bits and pieces I've to string together -- and testing for multiplayer by switching between different user sessions with their own instance of Factorio is a massive slow-down), and I've decided that it would be practical if vehicles "owned" by a player could have a passenger. Also, an owned vehicle can't be claimed by somebody else, but if the vehicle isn't locked, it can now be used by others.eradicator wrote: ↑Mon Sep 16, 2019 1:11 pmBut to the point: The premise of the @OP is that the player summons an *empty* car to some random position. So none of this applies.
More users -> more bug reports. Faster release -> earlier bugreports. The numbers are bullshit anyway (sadly), and keeping them "artificially low" does not helping anyone :p. So i release when i got all the features in i want to have and i'm sure enough there aren't any major bugs left.Pi-C wrote: ↑Fri Sep 20, 2019 10:36 amContra: Uploading new versions with only minor changes when I know that more changes will be added soon could look like a dirty trick to push download numbers, so I find it more appealing to release a new version that incorporates everything I thought of at the moment.
Which way do you prefer?
Somebody was kind enough to make a translation to Russian. I already asked whether I may contact him again if needed (he agreed). With the current update, I've added some strings and changed some others, and there may be more changes if I try to fiddle with the surfaces. Asking now for a new translation, and asking again next week because there is another update might be taxing his patience, though. That would be another argument for delaying the release.eradicator wrote: ↑Fri Sep 20, 2019 4:49 pmMore users -> more bug reports. Faster release -> earlier bugreports. The numbers are bullshit anyway (sadly), and keeping them "artificially low" does not helping anyone :p. So i release when i got all the features in i want to have and i'm sure enough there aren't any major bugs left.
I've already thought of that!But...if there's a passenger in someones owned car, do you really want them to be teleported *with* the car? I think i'd prefer to be ejected instead of teleported who-knows-where. But i can see arguments in both directions.
Code: Select all
new_passenger_warn_guest=This locked __1__ belongs to __2__. Only the owner can drive it. __2__ can also summon the __1__ (and you!) anywhere at any time.\nGet out now if that seems too risky!
vehicle_unlock_warn_guest=This unlocked __1__ belongs to __2__. Drive in it, but be aware that __2__ may summon the __1__ anytime and anywhere -- and you with it!
Github is like dark magic to me (I know, I said something similar about modding once upon a time!), I have no account there, and the only thing I use is "git pull --rebase" to get the latest code of my favorite mail client.eradicator wrote: ↑Fri Sep 20, 2019 8:20 pmYou could try publishing the locale file somewhere (i.e. github), then the translator can submit patches he sees fit on his own. You can add comments prefixed with ";" (semicolon, seperate line) too, so if you think something might change in a few days you can just add that info there.
You can own just one vehicle at a time. However, you can lock the vehicle you currently own and give it up by claiming a new one. Locked vehicles can't be mined or moved, and nothing can be taken from them, so in effect, vehicles locked by yourself are still yours. (That's the theory -- just tested, and locked vehicles without an owner can be claimed by anybody with a key, and then unlocked. I'll try to fix this after uploading the current version…)There's also the possibility of using it as a method of teleportation. Just place 20 cars in base before you go to a remote outpost and you can teleport anybody there. *Can* you even own more than one car? Also this reminds me that some (many?) multiplayer games *do* have a "teleport to player x" feature to make coop less annoying. I think i'll add that to my "list of things i'll never mod in the end".
Translation suggestions:
"Dis be Susansturfcar. Get out or get teleported!"
"Susans car. Abduction chance while riding: 50%."
"Susan owns this car and can summon it at any time."
"This is Susans car. Don't Panic!"
You must mean "diverse". You'll find "w/m/d" (or was it "m/w/d"?) in job advertisements here, meaning in English "f(emale)/m(ale)/d(iverse)". I'm not sure, though, how the non-binary gender people feel about that. Sure, they are officially acknowledged now, but being called "diverse" by others? Looks like a new, seemingly polite ostracism to me.
I've actually thought about that: Make a table with the relevant entity names (either look through all mods yourself or ask you users to report any modded car-entities they care about). Each table entry contains another table, containing language, translation, and grammatical gender of the term in that language. Whenever you want to print the name, lookup the locale used by the player, look up the grammatical gender, and pick the appropriate form. Perhaps localize each term twice (with and without article). Oh, and don't forget that you may need to consider upper/lower case (at the start and in the middle of a sentence). And if you're localizing for German, don't forget that you have up to 24 forms to consider for adjective + noun (4 cases, each for singular and plural; all of that for no article + adjective + noun, indefinite article + adjective + noun, and definite article + adjective + noun. Now you just have to make sure you keep track of all the localization keys and don't mix up arguments in your code. If you're done, you will certainly manage to do some other, trivial things: dividing by zero, building a perpetual motion machine, granting universal peace …But yea, that's a pretty mean problem. Now that you mention it i'm suprised none of my mods have encoutered it yet. I guess i just don't handle any dynamic mod entities. And there's not really anything you can do about it because the locales have to have the same structure in all languages. So if one language declines the article and the noun, and the next language declines the noun and the verb...then you're pretty much out of luck. I.e. even if you knew the German gender of a "Hovercraft", you don't know the locale of the player, so you'd have to magically find a single print() command that prints correct regardless of the language used.
Yuck! That looks a bit too formal! I'd even prefer "Dis be Susans turf" over it!"Dieses/r __1__ gehört Susanne."
No, i meant non-binary. But i have no clue if that is equal to "diverse" or not today. This stuff changes too often and so far i haven't been forced to try to deal with it.
No, they demand this by themselfs. According to the internet™, depending on how they feel they will ask you to use a different personal pronoun when addressing "zem". The "z" thing seems to be the "backup" variant in english if you haven't asked the person what their "preferred way to be addressed" is yet:
Before 0.17.69 this was impossible. Now it still requires ugly hacks. Apart from that i think at that point it's better to do the localization completely in lua instead of breaking your fingers trying to bend the locale.cfg system into shapes it was never meant to take :p.
Mission accomplished!
It's worse. A Hovercraft is a thing so it would be "Dieses Hovercraft gehört Susanne.". But it's also female as in "She's a beauty". Vehicles are often personified. On the other hand a helicopter is male all the way I would say.eradicator wrote: ↑Sat Sep 21, 2019 9:38 pmAnd then the non-binary gender people enter the stage and demand you address them "ze" and that that robot over there self-identifies as fourth-gender ;p.
But yea, that's a pretty mean problem. Now that you mention it i'm suprised none of my mods have encoutered it yet. I guess i just don't handle any dynamic mod entities. And there's not really anything you can do about it because the locales have to have the same structure in all languages. So if one language declines the article and the noun, and the next language declines the noun and the verb...then you're pretty much out of luck. I.e. even if you knew the German gender of a "Hovercraft", you don't know the locale of the player, so you'd have to magically find a single print() command that prints correct regardless of the language used.
"Dieses/r __1__ gehört Susanne."
No problem, just change the string to
The image tag seems to be broken so you have to click at the link yourself:Pi-C wrote: ↑Mon Sep 30, 2019 10:21 amNo problem, just change the string to
"Diese/r/s __1__ gehört Susanne." (endings in alphabetical order)
It's pretty ugly, but should work. But have I mentioned yet that I think it's ugly? It's that downright-to-the-marrow-of-the-bone kind of ugly, the kind of ugly I don't want to even hear or read about, let alone see for real …
I'd assume that's an accident, no intent! Perhaps it's a hint that the delivery form is inside, or there may be one on inside and one on the outside. But somebody who really cares about gendering would never spell "innen" with a lowercase "i"!mrvn wrote: ↑Mon Sep 30, 2019 1:00 pmLieferschein/innen: http://en.1jux.net/119646-lieferschein-innen
I just tested with Factorissimo. Looks like I'll have to leave out cross-surface teleporting:eradicator wrote: ↑Sun Sep 15, 2019 7:54 pmJust get Factorissimo2 and do your own surface experiements. It's probably the most popular surface based mod. Making it generally fail for cross-surface just because there's a 0.1% chance that it might fail seems like a bad solution. As long as there's no passenger/driver in the car it'll always work. And even if there's one it'll still work if the character is attached to a player. So all you need to do is "if not character.player then fail() end" [Edit 1:see below] on both the passenger and the driver. (All "as far as i know", don't forget to do your own testing .)Pi-C wrote: ↑Sun Sep 15, 2019 7:25 pmWould 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 well? It would prevent all the problems mrvn has pointed out -- but would it be acceptable for players? I've never played on more surfaces than one …
Code: Select all
2010.944 Script @__GCKI__/common.lua:81: Checking surfaces!
2010.944 Script @__GCKI__/common.lua:81: Show entity.name: |car-key| (string)
2010.944 Script @__GCKI__/common.lua:81: Show entity.surface.index: |2| (number)
2010.945 Script @__GCKI__/common.lua:81: Show car.name: |crawler| (string)
2010.945 Script @__GCKI__/common.lua:81: Show car.surface.index: |1| (number)
2010.945 Script @__GCKI__/common.lua:81: Show same_surface: |false| (boolean)
2010.945 Script @__GCKI__/common.lua:81: Trying to teleport crawler from surface nauvis to Factory floor 1
2010.958 Error MainLoop.cpp:1195: Exception at tick 23681: The mod Gizmos Car Keys (improved) caused a non-recoverable error.
Please report this error to the mod author.
I'm pretty sure I've driven a car into factorissimo2 buildings. Check their teleport code.eradicator wrote: ↑Fri Oct 04, 2019 5:32 pmGosh. I was sure i tested this. But now it seems that i can't even teleport a car to another surface when i'm *inside* the car? Very annoying. Makes me want to implement vehicle support to my teleportation mod even less . And i'm sorry for talking buillshit earlier then...
Haven't used clone() yet. I'd assume that it's an exact copy except for the entity unit_number. I'm not sure what it does to the inventory content though. Some items have unique indexes/tags too (blueprints, modded items like factorissimo factories!, etc). So it might be nessecarry to clone the car, but LuaItemStack.transfer_stack() the items.
If you go that far you might as well all pack it up in a generic function that autodecides which method to use ofc...
I tried: You'll see that both the car and the building are damaged, they just collide. Perhaps I didn't hit the magic point quite right?